PHP Archive

If you want a PHP script to validate an email address here is a quick and simple PHP regular expression to do it. This script is also case-insensitive, so it will treat all characters as lower case. This script is a simple and  easy way to check the syntax and format of an email address. [...]

PHP Frameworks

Been thinking of using a PHP framework found a very interesting slideshow on the Zend Framework. Any opinions? | View | Upload your own

Found a great slide that talks about the top 10 mistakes when programming scalable applications with PHP. Discusses everything from hardware to AJAX. The AJAX piece I found to be very interesting. Check it out and give me your thoughts. | View | Upload your own

Quick and easy way to validate email strings. I picked this bit of code up from somewhere, not sure where….Think it was the Zend site. Credit goes to the original unknown author, not me. <?php function is_email($address) { $rc1 = (ereg(‘^[-!#$%&'*+./0-9=?A-Z^_`a-z{|}~]+’. ‘@’. ‘[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+.’. ‘[-!#$%&'*+\./0-9=?A-Z^_`a-z{|}~]+$’, $address)); $rc2 = (preg_match(‘/.+.ww+$/’,$address)); return ($rc1 && $rc2); } ?>

Quick tip for you PHP/Opera Users!

In Opera, go to Tools –> Preferences, and click on the search tab. You should “Add a new search engine” and fill in the blanks. Here is what I use:. Name: PHP Keyword: p Address: http://www.php.net/search.php Query string: pattern=%s&show=quickref You have to check “Use POST” to be able to type in a query string. Click [...]

Found a great little snippet of code to use for converting from American to Euro date format and back. $date=’12/31/2006’; print ereg_replace(”([0-9] )/([0-9] )/([0-9] )”,”\\2/\\1/\\3″,$date); Thanks to last-child.com for the Snippet. And from the comments below an even shorter snippet: echo date( ‘m-d-Y’, strtotime( $date) ); Thanks Justin!

How to speed up PHP

The following methods can help improve scalability with php applications. 1. object code caching Whenever a request comes in for a php script, it has to go through the compiler and then execute the object code. If this is cached, you skip compiling and go straight to executing, hence a speed increase There are quite [...]

AJAX for PHP without the Javascript

I know there are web developers out there that know squat about JavaScript. I know, I am one of them, I mean I can write something if I really have to but most things you need done with JavaScript you can find someone who has written a script, reference, library, framework that already does it….So [...]

Great PERL PHP Translations

You know when your programming in PERL or PHP and you just can’t think of that corresponding function? Well ease your mind. I have found a list that pairs them off and makes translating, either way, an much easier task. This list is great even if your not trying to translate from one to the [...]