[PHP] Phpstop.com project - wanna be a writer?
Hi guys and girls I have followed this group for quite some time now and have seen some great tipps and tricks concerning PHP and its surroundings. I have gotten hold of a very nice domain name ( phpstop.com ) and have thought of something nice I could do with it. Now, my idea is to start an E-ducation (online PHP education) website with some authors who know what they're talking about. I am not a master in PHP. I just know what I have to know. So I thought that some of you might be interested in taking part in this new thing. Some of my ideas (not too much thought through as I know some of you will have better ideas): -- very simple website structure -- a PDF magazine sent out every 4 weeks or so with tutorials, news, updates, etc -- a resource link database -- links to and introductions of opensource projects (list member projects?) -- a site / code review corner (subscribers ask the community to review their sites / code) -- website of the month ? If you are interested in taking part, please let me know either on or off list. My email: [EMAIL PROTECTED] Any input is appreciated. Any designers out there want to make a nice logo? Send em in, everything welcome. I will put up a poll for the logos I've received and we'll take the one that gets the most votes. Cheers ! Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Where to start!
First I would like to say that I have had PHP experience but not enough to say I am a PHP developer. I want to use PHP to build a site that uses MySQL, I am building it from scratch so I don't know where to start, should I start with PHP and design a database around my code, or should I designs the db and design the site are the db. is it just a matter of preference or is there a recommended way to do this? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Where to start!
As a person who has been developing database applications for several decades my advice is to ALWAYS start with the database design, then build your code around that. The database must be properly normalised otherwise it will be difficult to get at the data you need in an efficient manner. OO purists will say that you should start with your class hierarchy and leave the database till last as it is a mere implementation detail. This usually results in a software structure which is different from the database structure - known as Object-Relational impedance mismatch - and requires the addition of an extra layer of software known as an Object Relational Mapper (ORM). I consider these to be EVIL, as discussed in http://www.tonymarston.net/php-mysql/object-relational-mappers-are-evil.html -- Tony Marston http://www.tonymarston.net http://www.radicore.org Jorge [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] First I would like to say that I have had PHP experience but not enough to say I am a PHP developer. I want to use PHP to build a site that uses MySQL, I am building it from scratch so I don't know where to start, should I start with PHP and design a database around my code, or should I designs the db and design the site are the db. is it just a matter of preference or is there a recommended way to do this? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Where to start!
On Mon, 2008-05-05 at 01:15 -0600, Jorge wrote: First I would like to say that I have had PHP experience but not enough to say I am a PHP developer. I want to use PHP to build a site that uses MySQL, I am building it from scratch so I don't know where to start, should I start with PHP and design a database around my code, or should I designs the db and design the site are the db. is it just a matter of preference or is there a recommended way to do this? Database first. You can tailor it when you write your code if you've missed stuff, but in a from-scratch-project it should be 90% determined before you write the code. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Where to start!
The database must be properly normalised otherwise it will be difficult to get at the data you need in an efficient manner. Not true. If your needs are simple for example, normalisation can increase the complexity of a schema, hence increasing development time needed. Sometimes for example you could use something like a SET type, and search for something in it using FIND_IN_SET(). -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Where to start!
On Monday 05 May 2008 09:15:29 Jorge wrote: First I would like to say that I have had PHP experience but not enough to say I am a PHP developer. I want to use PHP to build a site that uses MySQL, I am building it from scratch so I don't know where to start, should I start with PHP and design a database around my code, or should I designs the db and design the site are the db. is it just a matter of preference or is there a recommended way to do this? Thanks I did it all from scratch (both the learning, and creating), did it the other way around, I started with PHP, REGRETTED that for some time. Start off with the db structure, then go over it again, and again for good measure. -- --- Børge Holen http://www.arivene.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] retrieve email address
HI! I do not use PEARm then find email address from email. Dose anyone know how to get it?? It does noe blow; ereg(^From: \s+ .*, $data) ; Regards, yui 2008/5/5 Richard Heyes [EMAIL PROTECTED]: I would like to retrieve email address from email with regular expression. --email . . . From: [EMAIL PROTECTED] . . . -- if anybody know how to do it, please send me email. Can, worms, everywhere. Try looking at the Mail::RFC822 package in PEAR. There's also a shortcut function for just matching an Interweb email address. -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Apache child pid segfault + APD
My main problem with using xdebug was that it seemed to require KDE to interpret the traces that it took, which I don't have installed on my server. I only spent 15 minutes looking at it, though, so that could be completely unjustified... Would upgrading glibc help? On Sat, May 3, 2008 at 12:48 AM, Mario Guenterberg [EMAIL PROTECTED] wrote: On Fri, May 02, 2008 at 10:24:03PM -0700, Waynn Lue wrote: *** glibc detected *** free(): invalid pointer: 0x002a9956d000 *** Hi Waynn, try to use xdebug instead of APD to profile you app. There is a problem with your glibc version and your APD version. In my environment php 5.2.6 with suhosin/apc, apache 2.2.8 and xdebug 2.0.2 it works fine. Greetings Mario -- -BEGIN GEEK CODE BLOCK- Version: 3.12 GCS/CM d- s++: a+ C$ UBL*$ P++ L+++ E--- W+++ N+ o-- K- w O- M- V-- PS++ PE++ Y PGP+++ t--- 5 X R++ tv- b+++ DI D G++ e* h r+++ y --END GEEK CODE BLOCK-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Apache child pid segfault + APD
Waynn Lue wrote: My main problem with using xdebug was that it seemed to require KDE to interpret the traces that it took, which I don't have installed on my server. I only spent 15 minutes looking at it, though, so that could be completely unjustified... Would upgrading glibc help? Hi, Recently there is a webinterface for interpreting the results of XDebug: http://blog.agoraproduction.com/index.php?/archives/67-XDebug-to-finally-get-a-Web-Frontend.html Maybe it is for your interest. -- Aschwin Wesselius /'What you would like to be done to you, do that to the other'/
Re: [PHP] Re: Where to start!
Richard Heyes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The database must be properly normalised otherwise it will be difficult to get at the data you need in an efficient manner. Not true. If your needs are simple for example, normalisation can increase the complexity of a schema, hence increasing development time needed. Sometimes for example you could use something like a SET type, and search for something in it using FIND_IN_SET(). I disagree. The database should ALWAYS be normalised to at least the 3rd normal form. Sometimes going beyond that to 4NF, 5NF or 6NF becomes too complex. -- Tony Marston http://www.tonymarston.net http://www.radicore.org -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Where to start!
Richard Heyes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Tony Marston wrote: Richard Heyes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The database must be properly normalised otherwise it will be difficult to get at the data you need in an efficient manner. Not true. If your needs are simple for example, normalisation can increase the complexity of a schema, hence increasing development time needed. Sometimes for example you could use something like a SET type, and search for something in it using FIND_IN_SET(). I disagree. The database should ALWAYS be normalised to at least the 3rd normal form. Sometimes going beyond that to 4NF, 5NF or 6NF becomes too complex. Sometimes it's just a waste of time. If your site isn't that busy, and speed isn't crucial, why waste the time using a more complicated database structure? I do not agree that creating a database which is normalised to3NF is a waste of time. On the contrary, a totally un-normalised database is nothing but a problem waiting to bite you in the a**e. Computer systems have a habit of growing over time, and if you don't follow the rules of normalisation your database will end up as the biggest bottleneck. Anyone who doesn't know how to reach 3NF shouldn't be designing databases. -- Tony Marston http://www.tonymarston.net http://www.radicore.org -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Where to start!
Tony Marston wrote: Richard Heyes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The database must be properly normalised otherwise it will be difficult to get at the data you need in an efficient manner. Not true. If your needs are simple for example, normalisation can increase the complexity of a schema, hence increasing development time needed. Sometimes for example you could use something like a SET type, and search for something in it using FIND_IN_SET(). I disagree. The database should ALWAYS be normalised to at least the 3rd normal form. Sometimes going beyond that to 4NF, 5NF or 6NF becomes too complex. Sometimes it's just a waste of time. If your site isn't that busy, and speed isn't crucial, why waste the time using a more complicated database structure? -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Where to start!
I do not agree that creating a database which is normalised to3NF is a waste of time. It isn't always, but it is sometimes. When time is a (significant) factor, getting something up and running (which has acceptable performance) may be more impotant than creating a technically perfect solution. In fact creating something that is technically perfect is often just a pipe dream for programmers. On the contrary, a totally un-normalised database is nothing but a problem waiting to bite you in the a**e. So you can: a) Create something that gets you to market as fast as possible that is good enough. b) Optimise/adjust the structure later. IME though, b) rarely happens. Computer systems have a habit of growing over time Really? ...and if you don't follow the rules of normalisation your database will end up as the biggest bottleneck. Granted it's more likely, but not a given. You just need developers who have discipline, oh and a good memory helps. Anyone who doesn't know how to reach 3NF shouldn't be designing databases. Rubbish. It helps, in particular for how you can optimise you structure without duplicating data (too much), but shouldn't be a requirement. -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RES: [PHP] set_error_handler help
Oh Yes this helped, thanks a lot :) I was missing the callback part ;) Regards, Thiago -Mensagem original- De: Jim Lucas [mailto:[EMAIL PROTECTED] Enviada em: sexta-feira, 2 de maio de 2008 15:26 Para: Thiago Pojda Assunto: Re: [PHP] set_error_handler help Thiago Pojda wrote: Hi guys, I'm trying some custom error handling functions in order to get emails when fatal errors come up in my production website. The thing is, I went to phpclasses and there was a good one, but it was a class. I'm very slow today, so I could not figure out how to get it working. So, I just removed it from the classs and used the function part. Which worked, but it got me confused: Is there any way to use a class to handle errors? I've tried some stuff like set_error_handler(Error_Handler::logError and such, but with no luck. Any hints? Thanks! Go here http://us2.php.net/set_error_handler Notice that the first parameter can be a callback function. Now click on call back and you will see how to setup an array with the object/method set so it will call a method within your object. http://us2.php.net/manual/en/language.pseudo-types.php#language.types.callba ck Hope that helps -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SMS Cellular Text Messaging
Am 2008-04-28 15:24:53, schrieb Richard Lynch: If you want any kind of volume, you pay a gateway. Or you could invest a few billion and build your own. :-) I am using a bunch of GSM/GPRS/EDGE modems which have cost me arround 105 Euro/Modem and bought some SIMs from O2, Vodaphone, D2, T-Mobile, Bougues Telecom Orange and SFR to setup my own Gateway between France and Germany... In Morocco, Turkey and Iran I have simpel P1/200MHz Computers with appropriated Modem and SIM connected and it goes over ADSL... So currently I am connection 5 countries... I do not need Billion only a One-Time-Investment of arround 4.000 Euro and then per day 800 Euro SMS invoices... Thanks, Greetings and nice Day Michelle Konzack Systemadministrator 24V Electronic Engineer Tamay Dogan Network Debian GNU/Linux Consultant -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ # Debian GNU/Linux Consultant # Michelle Konzack Apt. 917 ICQ #328449886 +49/177/935194750, rue de Soultz MSN LinuxMichi +33/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com) signature.pgp Description: Digital signature
Re: [PHP] Re: Where to start!
On May 5, 2008, at 6:21 AM, Tony Marston wrote: Anyone who doesn't know how to reach 3NF shouldn't be designing databases. Just out of curiosity... How many Records do you need to have in a database before you'll start seeing a performance boost from doing that? I have written a few database apps that work quite well with no formal training in PHP or Database design.. Don't want to start any wars here... I'm just curious :) -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424-9337 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RES: [PHP-DB] Shopping cart session handling
Forwarding to the correct mailing list. You should get flames...*cough* I mean, answers here :) Regards, Thiago -Mensagem original- De: Ron Piggott [mailto:[EMAIL PROTECTED] Enviada em: domingo, 4 de maio de 2008 19:35 Para: PHP DB Assunto: [PHP-DB] Shopping cart session handling I am writing a shopping cart. I wanted some input on session handling for a shopping cart that is secure. At this time I am not programming for credit card processing. I am going to forward onto PayPal for payment initially. But I want to do a good job with security. Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Where to start!
Anyone who doesn't know how to reach 3NF shouldn't be designing databases. Just out of curiosity... How many Records do you need to have in a database before you'll start seeing a performance boost from doing that? There's no hard and fast rule. When it becomes a chore to maintain I suppose (which you could say, is more than one...). -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Where to start!
Richard Heyes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I do not agree that creating a database which is normalised to3NF is a waste of time. It isn't always, but it is sometimes. When time is a (significant) factor, getting something up and running (which has acceptable performance) may be more impotant than creating a technically perfect solution. In fact creating something that is technically perfect is often just a pipe dream for programmers. You obviously do not understand what technically perfect means when it comes to data normalisation. 3NF is considered to be good enough while 4NF, 5NF and 6NF is considered to be perfect. But there is such a thing as too perfect which is why even C J Date (the father of relational theory) said that de-normalsation is an acceptable practice. Every database designer worth his salt should be able to achieve 3NF without breaking into a sweat, while 4/5/6NF are entirely optional, and only worth it under paricular circumstances. On the contrary, a totally un-normalised database is nothing but a problem waiting to bite you in the a**e. So you can: a) Create something that gets you to market as fast as possible that is good enough. b) Optimise/adjust the structure later. IME though, b) rarely happens. That's why solutions which are thrown together are often incapable of being expanded to include new requirements. If you create a throw away solution then never try to expand it, simply throw it away and start again. -- Tony Marston http://www.tonymarston.net http://www.radicore.org Computer systems have a habit of growing over time Really? ...and if you don't follow the rules of normalisation your database will end up as the biggest bottleneck. Granted it's more likely, but not a given. You just need developers who have discipline, oh and a good memory helps. Anyone who doesn't know how to reach 3NF shouldn't be designing databases. Rubbish. It helps, in particular for how you can optimise you structure without duplicating data (too much), but shouldn't be a requirement. -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Where to start!
Jason Pruim [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On May 5, 2008, at 6:21 AM, Tony Marston wrote: Anyone who doesn't know how to reach 3NF shouldn't be designing databases. Just out of curiosity... How many Records do you need to have in a database before you'll start seeing a performance boost from doing that? I have written a few database apps that work quite well with no formal training in PHP or Database design.. Don't want to start any wars here... I'm just curious :) It is not the number of records which is the deciding factor - it is: a) is the data want in the right place (for easy access)? b) can it be upated easily? For example, many years ago I had to take over maintenance of a database which was designed b someone who was not technically competent. There were 2 paticular tables, order_header and order_lines. The order had a status value, as did each of the order lines. So where did this twit choose to store the order status? - you've guessed it, on the order_line record. His rationale was that when traversing the order_line recods it was easier to have the order_status on that record instead of having to perform a separate read of the order_header record. The flaw in this argument was that when you wanted to change the status of an order you had to update every order_line record. Problems arose later when a software bug (introduced by him, BTW) left different values for order_status across different order_lines. The rules of normalisation dictate that order_status goes on the order_header record, and is not dupliacted across several order_line records. -- Tony Marston http://www.tonymarston.net http://www.radicore.org -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424-9337 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Phpstop.com project - wanna be a writer?
I have gotten hold of a very nice domain name ( phpstop.com ) and have thought of something nice I could do with it. Now, my idea is to start an E-ducation (online PHP education) website with some authors who know what they're talking about. I've been thinking about the same thing. http://php1.net/ Just not ready to launch yet. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Phpstop.com project - wanna be a writer?
ROFL! I can not believe Mr Tedd THE Sperling has been thinking bout the same thing. Well, you are going to do it webbased, aren't ya? I was thinking to have it in PDF magazine style. Maybe I can have you as a writer? ;o) And maybe 2 or 3 more of this list The big names, ya know *g* -Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: Monday, May 05, 2008 3:08 PM To: [EMAIL PROTECTED]; php-general@lists.php.net Subject: Re: [PHP] Phpstop.com project - wanna be a writer? I have gotten hold of a very nice domain name ( phpstop.com ) and have thought of something nice I could do with it. Now, my idea is to start an E-ducation (online PHP education) website with some authors who know what they're talking about. I've been thinking about the same thing. http://php1.net/ Just not ready to launch yet. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Phpstop.com project - wanna be a writer?
On Mon, 2008-05-05 at 15:12 +0200, Chris Haensel wrote: Maybe I can have you as a writer? ;o) And maybe 2 or 3 more of this list The big names, ya know *g* Oh well, my name is only 4 letters so I guess I am out? ;) --Paul All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Where to start!
You obviously do not understand what technically perfect means when it comes to data normalisation. Obviously. That's why solutions which are thrown together are often incapable of being expanded to include new requirements. I've never adovocated throwing together a solution. Merely that the solutions proposed by programmers or database designers aren't always necessary. If you create a throw away solution then never try to expand it, simply throw it away and start again. For what reason? If you create a working solution and never try to expand it, chances are you don't need to, so what's the advantage in throwing it away and generating work for yourself in reproducing it? -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Any Running Simple Ajax Sample for Php
On Fri, May 2, 2008 at 4:31 PM, Jon L. [EMAIL PROTECTED] wrote: If you aren't already, I recommend putting to use a JS library with Ajax support. Nothing else, they can reduce the browser compatibility overhead coding you'll need to do. I found that they also reduce or eliminate some memory leaks in the web browser that seem to be common for most of the AJAX examples I have seen on the web. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Apache child pid segfault + APD
On Mon, May 05, 2008 at 02:41:17AM -0700, Waynn Lue wrote: My main problem with using xdebug was that it seemed to require KDE to interpret the traces that it took, which I don't have installed on my server. I only spent 15 minutes looking at it, though, so that could be completely unjustified... Would upgrading glibc help? On Sat, May 3, 2008 at 12:48 AM, Mario Guenterberg [EMAIL PROTECTED] wrote: On Fri, May 02, 2008 at 10:24:03PM -0700, Waynn Lue wrote: *** glibc detected *** free(): invalid pointer: 0x002a9956d000 *** Hi Waynn, try to use xdebug instead of APD to profile you app. There is a problem with your glibc version and your APD version. In my environment php 5.2.6 with suhosin/apc, apache 2.2.8 and xdebug 2.0.2 it works fine. Upgrading the glibc on a server is not the best choice to solve a problem with a extension for php ;-). There's a webfrontend for xdebug. Greetings guenti -- -BEGIN GEEK CODE BLOCK- Version: 3.12 GCS/CM d- s++: a+ C$ UBL*$ P++ L+++ E--- W+++ N+ o-- K- w O- M- V-- PS++ PE++ Y PGP+++ t--- 5 X R++ tv- b+++ DI D G++ e* h r+++ y --END GEEK CODE BLOCK-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Phpstop.com project - wanna be a writer?
On May 5, 2008, at 9:17 AM, Paul Scott wrote: On Mon, 2008-05-05 at 15:12 +0200, Chris Haensel wrote: Maybe I can have you as a writer? ;o) And maybe 2 or 3 more of this list The big names, ya know *g* Oh well, my name is only 4 letters so I guess I am out? ;) --Paul That's why you make up a longer middle name... Paul The ultimate programmer who can do anything in any language blindfolded with the computer displaying in a foreign language Scott ;) -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424-9337 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web page excerpt editor
At 6:49 PM -0400 5/4/08, Robert Cummings wrote: On Sun, 2008-05-04 at 17:27 -0500, Mike Potter wrote: On Sun, May 4, 2008 at 11:46 AM, Paul Scott wrote: FCKEditor, TinyMCE and a host of others. All JS based, so not really relevant on a PHP list though Whereas, SnippetMaster *is* PHP-based. Sad if it's the only one, I thought (hoped) there would be more. When you can't find what you want, feel free to pick up you keyboard and create the solution. Then be sure to share it with everyone else. Cheers, Rob. To all: FCKEditor and TinyMCE are impressive in what they do, but they produce a mix of css and html -- that's not good in my book. SnippetMaster is kind of neat in that it is PHP and uses editable regions. I've been trying to come up with an alternative -- here's my twist: http://www.webbytedd.com/a/easy-page-db Please note the [Edit Mode] link on the top right of the page. I'm not willing to share the code at this point because I haven't worked out all the bugs, but I'm sure the demo expresses my idea. My quandary is how much freedom do I give the client in allowing them to use html tags? The client is not going to deliberately try to mess up their own site, but not having well formed html can create problems. I am open to comments and suggestions. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Where to start!
On Mon, 2008-05-05 at 10:31 +0100, Tony Marston wrote: Richard Heyes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The database must be properly normalised otherwise it will be difficult to get at the data you need in an efficient manner. Not true. If your needs are simple for example, normalisation can increase the complexity of a schema, hence increasing development time needed. Sometimes for example you could use something like a SET type, and search for something in it using FIND_IN_SET(). I disagree. The database should ALWAYS be normalised to at least the 3rd normal form. Sometimes going beyond that to 4NF, 5NF or 6NF becomes too complex. I'd have to agree for the most part. There are times when you specifically will include redundancy for speed, but as a newbie you probably won't be thinking about that. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Where to start!
On Mon, 2008-05-05 at 11:10 +0100, Richard Heyes wrote: Tony Marston wrote: Richard Heyes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The database must be properly normalised otherwise it will be difficult to get at the data you need in an efficient manner. Not true. If your needs are simple for example, normalisation can increase the complexity of a schema, hence increasing development time needed. Sometimes for example you could use something like a SET type, and search for something in it using FIND_IN_SET(). I disagree. The database should ALWAYS be normalised to at least the 3rd normal form. Sometimes going beyond that to 4NF, 5NF or 6NF becomes too complex. Sometimes it's just a waste of time. If your site isn't that busy, and speed isn't crucial, why waste the time using a more complicated database structure? Hmmm, my last post should have clarified I agreed primarily with 3rd normal form. Higher levels don't usually have the same kind of payoff. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Where to start!
On Mon, 2008-05-05 at 13:51 +0100, Tony Marston wrote: Richard Heyes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I do not agree that creating a database which is normalised to3NF is a waste of time. It isn't always, but it is sometimes. When time is a (significant) factor, getting something up and running (which has acceptable performance) may be more impotant than creating a technically perfect solution. In fact creating something that is technically perfect is often just a pipe dream for programmers. You obviously do not understand what technically perfect means when it comes to data normalisation. 3NF is considered to be good enough while 4NF, 5NF and 6NF is considered to be perfect. Perfectly tedious ;) Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Where to start!
On May 5, 2008, at 9:43 AM, Dan Joseph wrote: On Mon, May 5, 2008 at 3:15 AM, Jorge [EMAIL PROTECTED] wrote: First I would like to say that I have had PHP experience but not enough to say I am a PHP developer. I want to use PHP to build a site that uses MySQL, I am building it from scratch so I don't know where to start, should I start with PHP and design a database around my code, or should I designs the db and design the site are the db. is it just a matter of preference or is there a recommended way to do this? I think while Richard and Tony are duking it out, maybe you could explain a little more about this application. How big do you think it will be. How much acitivity, etc? That would probably help us point you in the right direction. Right now I just have 1 application, with a small account in it, it's about 1,000 records... But I plan on marketing the program which would (Hopefully) increase the user base and total records. I could see having 20-30 customers with all with around 1,000 to 30,000+ names in the database. At least that's what I'm hoping for. We'll see how the marketing goes! :) -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424-9337 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Phpstop.com project - wanna be a writer?
On Mon, 2008-05-05 at 09:08 -0400, tedd wrote: I have gotten hold of a very nice domain name ( phpstop.com ) and have thought of something nice I could do with it. Now, my idea is to start an E-ducation (online PHP education) website with some authors who know what they're talking about. I've been thinking about the same thing. http://php1.net/ Just not ready to launch yet. Oh my god me too: http://www.php.net There's a mailing list... and it doesn't come with popups and shit :) Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Phpstop.com project - wanna be a writer?
On Mon, 2008-05-05 at 15:17 +0200, Paul Scott wrote: On Mon, 2008-05-05 at 15:12 +0200, Chris Haensel wrote: Maybe I can have you as a writer? ;o) And maybe 2 or 3 more of this list The big names, ya know *g* Oh well, my name is only 4 letters so I guess I am out? ;) I was gonna use a big font, but most of ya prolly have HTML turned off... come to think of it, so do I :) Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Phpstop.com project - wanna be a writer?
On Mon, 2008-05-05 at 09:34 -0400, Jason Pruim wrote: On May 5, 2008, at 9:17 AM, Paul Scott wrote: On Mon, 2008-05-05 at 15:12 +0200, Chris Haensel wrote: Maybe I can have you as a writer? ;o) And maybe 2 or 3 more of this list The big names, ya know *g* Oh well, my name is only 4 letters so I guess I am out? ;) --Paul That's why you make up a longer middle name... Paul The ultimate programmer who can do anything in any language blindfolded with the computer displaying in a foreign language Scott ;) That's multiple words... you need hyphens... no worries though, they'll still be SEO friendly with hyphens... not so true with underscores though :/ Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web page excerpt editor
On May 5, 2008, at 9:43 AM, tedd wrote: At 6:49 PM -0400 5/4/08, Robert Cummings wrote: On Sun, 2008-05-04 at 17:27 -0500, Mike Potter wrote: On Sun, May 4, 2008 at 11:46 AM, Paul Scott wrote: FCKEditor, TinyMCE and a host of others. All JS based, so not really relevant on a PHP list though Whereas, SnippetMaster *is* PHP-based. Sad if it's the only one, I thought (hoped) there would be more. When you can't find what you want, feel free to pick up you keyboard and create the solution. Then be sure to share it with everyone else. Cheers, Rob. To all: FCKEditor and TinyMCE are impressive in what they do, but they produce a mix of css and html -- that's not good in my book. SnippetMaster is kind of neat in that it is PHP and uses editable regions. I've been trying to come up with an alternative -- here's my twist: http://www.webbytedd.com/a/easy-page-db Please note the [Edit Mode] link on the top right of the page. I'm not willing to share the code at this point because I haven't worked out all the bugs, but I'm sure the demo expresses my idea. My quandary is how much freedom do I give the client in allowing them to use html tags? The client is not going to deliberately try to mess up their own site, but not having well formed html can create problems. I am open to comments and suggestions. Hey tedd, Just as an idea, would it be alot of work to do a basic editor, and then have an advanced button? That way, for the people who don't know as much they can just stay in the basic part that lets them pretty much type in the info and the editor changes it into HTML and advanced basically gives them a blank slate to work with? Just a thought.. -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424-9337 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Where to start!
Richard Heyes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] You obviously do not understand what technically perfect means when it comes to data normalisation. Obviously. That's why solutions which are thrown together are often incapable of being expanded to include new requirements. I've never adovocated throwing together a solution. Merely that the solutions proposed by programmers or database designers aren't always necessary. I never use databases which have been designed by others, especially DBAs who have fancy but often unrealistic ideas on how databases should be designed. I design the databases myself, then write the code to access them. If I later find that I need to change the database design then I can do so without having to ask anyone's permission. If you create a throw away solution then never try to expand it, simply throw it away and start again. For what reason? If you create a working solution and never try to expand it, chances are you don't need to, so what's the advantage in throwing it away and generating work for yourself in reproducing it? Your experience in the real world must be very limited as it is often the case where a customer starts off with a simple requirement then keeps expanding it as time goes by as he dreams up more things that the system should do for him. If at day #1 you say these reqirements are very simple, therefore require nothing more than a cheap and chearful solution which can be thrown together in a few minutes you end up with a system that is not designed to be expanded. As soon as the first enhancement request comes in you will find yourself on the tail of a snake. -- Tony Marston http://www.tonymarston.net http://www.radicore.org -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Where to start!
On Mon, May 5, 2008 at 3:15 AM, Jorge [EMAIL PROTECTED] wrote: First I would like to say that I have had PHP experience but not enough to say I am a PHP developer. I want to use PHP to build a site that uses MySQL, I am building it from scratch so I don't know where to start, should I start with PHP and design a database around my code, or should I designs the db and design the site are the db. is it just a matter of preference or is there a recommended way to do this? I think while Richard and Tony are duking it out, maybe you could explain a little more about this application. How big do you think it will be. How much acitivity, etc? That would probably help us point you in the right direction. -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. Reseller plans and Dedicated servers available. Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life.
RE: [PHP] Phpstop.com project - wanna be a writer?
At 3:12 PM +0200 5/5/08, Chris Haensel wrote: ROFL! I can not believe Mr Tedd THE Sperling has been thinking bout the same thing. Well, you are going to do it webbased, aren't ya? I was thinking to have it in PDF magazine style. Maybe I can have you as a writer? ;o) And maybe 2 or 3 more of this list The big names, ya know *g* I'm not sure as to how you meant that -- I hope it was in a good way. I expressed my thoughts because we might find some common ground, or not -- just an idea. I don't go by the name Tedd anymore -- non sum qualis eram. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Where to start!
Right now I just have 1 application, with a small account in it, it's about 1,000 records... But I plan on marketing the program which would (Hopefully) increase the user base and total records. I could see having 20-30 customers with all with around 1,000 to 30,000+ names in the database. At least that's what I'm hoping for. Well that's easy: ++ | Accounts | +---++ | ac_id | ac_foo | +---++ | | +--+ | | Names| | +-++ + | na_acid | na_foo | +-++ How's that for ASCII art? :-) -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Where to start!
Your experience in the real world must be very limited Clearly. as it is often the case where a customer starts off with a simple requirement then keeps expanding it as time goes by as he dreams up more things that the system should do for him. If at day #1 you say these reqirements are very simple, therefore require nothing more than a cheap and chearful solution which can be thrown together in a few minutes you end up with a system that is not designed to be expanded. As soon as the first enhancement request comes in you will find yourself on the tail of a snake. Alternatively you make a solution that fulfils the requirements of the customer, without being cheap and cheerful and is designed well to accomodate future modifications, and make it resolutely clear that any future modification may take longer since schema changes may be required. -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Phpstop.com project - wanna be a writer?
[snip] I have gotten hold of a very nice domain name ( phpstop.com ) and have thought of something nice I could do with it. Now, my idea is to start an E-ducation (online PHP education) website with some authors who know what they're talking about. [/snip] By the very act of responding to this I am a writer, no? Actually sounds like a good idea save for the numerous other sites out there that purport to do the same thing. There are many authors with expertise in PHP writing every day all over the globe. I only say this to make you aware of the competition. There are even non-PHP specific sites out there that have a raft of PHP articles (http://www.evolt.org comes to mind as does http://www.alistapart.com where the primary focus is design). http://www.phparch.com is a very popular publishing site for PHP'ers. I am not trying to dampen your enthusiasm for this kind of project at all. I just want you to know that while you have a noble idea you may face challenges getting writers (and readers) due to the established sites. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Where to start!
Richard Heyes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Your experience in the real world must be very limited Clearly. as it is often the case where a customer starts off with a simple requirement then keeps expanding it as time goes by as he dreams up more things that the system should do for him. If at day #1 you say these reqirements are very simple, therefore require nothing more than a cheap and chearful solution which can be thrown together in a few minutes you end up with a system that is not designed to be expanded. As soon as the first enhancement request comes in you will find yourself on the tail of a snake. Alternatively you make a solution that fulfils the requirements of the customer, without being cheap and cheerful and is designed well to Then surely designed well would include a normalised database? -- Tony Marston http://www.tonymarston.net http://www.radicore.org accomodate future modifications, and make it resolutely clear that any future modification may take longer since schema changes may be required. -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Where to start!
On May 5, 2008, at 10:11 AM, Richard Heyes wrote: Right now I just have 1 application, with a small account in it, it's about 1,000 records... But I plan on marketing the program which would (Hopefully) increase the user base and total records. I could see having 20-30 customers with all with around 1,000 to 30,000+ names in the database. At least that's what I'm hoping for. Well that's easy: ++ | Accounts | +---++ | ac_id | ac_foo | +---++ | | +--+ | | Names| | +-++ + | na_acid | na_foo | +-++ At it's most basic part, that is exactly what I have :) How's that for ASCII art? :-) I've seen better ;) -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424-9337 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Phpstop.com project - wanna be a writer?
On Mon, May 5, 2008 at 9:59 AM, tedd [EMAIL PROTECTED] wrote: At 3:12 PM +0200 5/5/08, Chris Haensel wrote: The big names, ya know *g* I don't go by the name Tedd anymore -- non sum qualis eram. I'd visit the site just to see who the Big Names[tm] are. ;-P -- /Daniel P. Brown Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contract! Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web page excerpt editor
On Mon, May 5, 2008 at 9:43 AM, tedd [EMAIL PROTECTED] wrote: FCKEditor and TinyMCE are impressive in what they do, but they produce a mix of css and html -- that's not good in my book. This is an interesting idea. Most clients don't want to see a text area to input raw html though. In the many years I've done this only 3 people have ever requested it specifically out of hundreds. You might want to look into shoving generated markup through ext/tidy. It might have some options to clean up all that embedded css. Maybe I'll have to look into it later when I have some free time. I'm tired of seeing those mso styles from Word. ;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Recommended book on PHP/SOAP
I would like a book on implementing SOAP geared for someone with no SOAP experience. Hopefully SOAP can be used with PHP 4?!? Many thanks... Todd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Recommended book on PHP/SOAP
On Mon, May 5, 2008 at 12:29 PM, Todd Cary [EMAIL PROTECTED] wrote: I would like a book on implementing SOAP geared for someone with no SOAP experience. Hopefully SOAP can be used with PHP 4?!? Many thanks... I'm not sure of a book, but for PHP4 you'll want to grab NuSOAP. Its actually a pretty nice SOAP library. You can ifnd it on google. I was able to work with it by searching for examples just fine. You may not even need a book. -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. Reseller plans and Dedicated servers available. Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life.
Re: [PHP] Recommended book on PHP/SOAP
Dan Joseph wrote: On Mon, May 5, 2008 at 12:29 PM, Todd Cary [EMAIL PROTECTED] wrote: I would like a book on implementing SOAP geared for someone with no SOAP experience. Hopefully SOAP can be used with PHP 4?!? Many thanks... I'm not sure of a book, but for PHP4 you'll want to grab NuSOAP. Its actually a pretty nice SOAP library. You can ifnd it on google. I was able to work with it by searching for examples just fine. You may not even need a book. Thank you Dan. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Where to start!
Then surely designed well would include a normalised database? Not necessarily. You could for example have a database that accommodates future needs without being completely normalised. -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Where to start!
Richard Heyes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Then surely designed well would include a normalised database? Not necessarily. You could for example have a database that accommodates future needs without being completely normalised. That depends on your definition of completely normalised. Up to 3NF is normally sufficient, whereas up to 6NF might be excessive. But any degree of normalisation is better than not having any normalisation at all. The point I am trying to make is that a totally unnormalised database is something which a competent designer will tend to avoid like the plague. Only a complete novice will throw together a database which has 0NF. -- Tony Marston http://www.tonymarston.net http://www.radicore.org -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Recommended book on PHP/SOAP
On May 5, 2008, at 12:29 PM, Todd Cary wrote: I would like a book on implementing SOAP geared for someone with no SOAP experience. A book I like is: Pro PHP XML and Web Services # ISBN-10: 1590596331 # ISBN-13: 978-1590596333 This book requires PHP 5. Hopefully SOAP can be used with PHP 4?!? Of course...it is after all still just text transported via the HTTP protocol and PHP does a good job at parsing text, so, at a minimum, you could write your own support for SOAP in PHP 4. Why are you looking at PHP4? After August of this year, PHP 4 will no longer be supported and I don't believe it had any built-in support for SOAP as PHP 5 does. Although, I believe there is some third-party support for SOAP in PHP 4. I believe this is one example: http://pear.php.net/package/SOAP/ http://www.evolt.org/article/The_PEAR_SOAP_Implementation/21/49993/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] using explode
Hi everyone, I am wondering if I can write this cleaner? $weightExplode = explode(., $totalWeight); $explodetest = .; $explodetest .= $weightExplode[1]; $explodetest = $explodetest*16; I'm hoping I've missed something... Basically I just need to include the . in $weightExplode[1] before I multiply it by 16. That's the only part that is confusing me right now... Any ideas? -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424-9337 www.raoset.com [EMAIL PROTECTED]
Re: [PHP] using explode
Jason Pruim írta: Hi everyone, I am wondering if I can write this cleaner? $weightExplode = explode(., $totalWeight); $explodetest = .; $explodetest .= $weightExplode[1]; $explodetest = $explodetest*16; I'm hoping I've missed something... Basically I just need to include the . in $weightExplode[1] before I multiply it by 16. That's the only part that is confusing me right now... Any ideas? I can't write it cleaner, though I can write it shorter: $weightExplode = explode('.', $totalWeight); $explodetest = ((float)('.' . $weightExplode[1])) * 16; (the (float) casting is maybe not required, but I think it's good practice) greets, Zoltán Németh -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424-9337 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using explode
On 5 May 2008, at 20:04, Jason Pruim wrote: I am wondering if I can write this cleaner? $weightExplode = explode(., $totalWeight); $explodetest = .; $explodetest .= $weightExplode[1]; $explodetest = $explodetest*16; I'm hoping I've missed something... Basically I just need to include the . in $weightExplode[1] before I multiply it by 16. That's the only part that is confusing me right now... $explodetest = ($totalWeight - intval($totalWeight)) * 16; Untested but should have the same effect as your code. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Regex to catch ps
Hey all! To say I suck at regex is an understatement so really need any help I can get on this, I have a page of text with different html tags in them, but each block of text has a p or a class=something tag... anybody have any regex that will catch each of these paragraphs and put then into an array example: array[0]=p first block /p; array[1]=p class=blah block X/p; Thanks! R Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regex to catch ps
On Mon, May 5, 2008 at 9:59 PM, Ryan S [EMAIL PROTECTED] wrote: To say I suck at regex is an understatement so really need any help I can get on this, I have a page of text with different html tags in them, but each block of text has a p or a class=something tag... anybody have any regex that will catch each of these paragraphs and put then into an array If you're using php5 you can use DOM's getElementsByTagName. If you still think you need to do some sort of regex it is possible but it will be buggy at best. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Assigning functions
On May 2, 2008, at 2:42 PM, Craige Leeder wrote: Hello Philip First thing first: design patterns are your friend. A good reference for which, is: http://www.fluffycat.com/PHP-Design-Patterns/ Second of all. What is the situation in which you are trying to do this? I can't really think of one where you would do such a thing. - Craige Sorry I haven't responded earlier... was away from my computer since Friday! First, thanks for the link. Second, because of the way our application is setup, I am interested in doing this functionality. However, someone pointed out a very good point - basically abstraction and classes not needing to know about other classes. So, 'A' knowing about 'C' is not a good thing (TM). After thinking twice about it, I won't take this approach. However, the reason this came up is because the application is split up logically between the database layer, security layer, view layer, logic layer, etc... There is a core class which has generic functions in it which is called on every request. In this class, other classes are instantiated and used throughout the app. Kinda like this... ?php class Core { $this-site = new Site (); } class Site { $this-render = new Render (); } class Render { function translate ($template, $arr) { $content = str_replace ( array_keys($arr), array_values($arr), $template.tpl.php ); return $content; } function stroke () { } } // Somewhere in the app... $content = $core-site-render-translate('someTemplate', $replace); ? Obviously, these are VERY dumbed-down versions of the classes, but this is the general idea. It all comes down to separation of business logic from the view from the database, and so on. Hopefully that's as clear as mud now. ~Philip On Fri, May 2, 2008 at 3:09 PM, Philip Thompson [EMAIL PROTECTED] wrote: Hi all. I have several classes. Within each class, a new class is called. Is there a way to assign a function in a *deeper* class to be called in the first class? Example to follow.. ?php class A { function __construct () { $this-b = new B (); // I want to do the following. This does not work, of course. $this-doSomething = $this-b-c-doSomething; } } class B { function __construct () { $this-c = new C (); } } class C { function __construct () { } function doSomething () { echo ¡Hi!; } } $a = new A (); // Instead of doing this, $a-b-c-doSomething(); // I want to do this. $a-doSomething(); // ¡Hi! ? Basically, it's just to shorten the line to access a particular function. But, is it possible?! Thanks, ~Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regex to catch ps
clip To say I suck at regex is an understatement so really need any help I can get on this, I have a page of text with different html tags in them, but each block of text has a p or a class=something tag... anybody have any regex that will catch each of these paragraphs and put then into an array If you're using php5 you can use DOM's getElementsByTagName. If you still think you need to do some sort of regex it is possible but it will be buggy at best. /clip Nope, need a regex... guess I have no choice, either chancy regex or nothing... I know for a fact that the first paragraph tag wont contain a class, and for the p tags that contain a class=blah does it matter that i know exactly what the classname is? Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Phpstop.com project - wanna be a writer?
-Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: Monday, May 05, 2008 3:59 PM To: php-general@lists.php.net Subject: RE: [PHP] Phpstop.com project - wanna be a writer? At 3:12 PM +0200 5/5/08, Chris Haensel wrote: ROFL! I can not believe Mr Tedd THE Sperling has been thinking bout the same thing. Well, you are going to do it webbased, aren't ya? I was thinking to have it in PDF magazine style. Maybe I can have you as a writer? ;o) And maybe 2 or 3 more of this list The big names, ya know *g* I'm not sure as to how you meant that -- I hope it was in a good way. I expressed my thoughts because we might find some common ground, or not -- just an idea. I don't go by the name Tedd anymore -- non sum qualis eram. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Hi Tedd, I absolutely meant that in a good way! You are one of the guys I see VERY active on this list, and I really get a lot from the help you're giving others. I really like the way you put things, so: yeah, I meant it in a good way :o) And I was a bit stunned when you wrote that you've had an almost similar idea. Maybe my english skills aren't good enough yet to show when I am trying to make a bit of a joke *gg* Maybe we can find some common gorund, as you said. I sure love the idea :o) All the best! Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php