Re: Variable Troubleshooting Code
| From: | Jim Lucas | Date: | Tue, 10 Jan 2012 16:35:50 +0000 |
| Subject: | Re: Variable Troubleshooting Code | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-316239@lists.php.net to get a copy of this message | ||
On 01/09/2012 07:16 PM, Donovan Brooke wrote:
Just to share, a Mr. Harkness forwarded me a consolidated version of my code.. basically substituting the innards for: if (!isset($pmatch) || substr($key,0,strlen($pmatch)) == $pmatch) { print "$key = $value<br />"; } Cheers, DonovanI would change the above the the following: if ( empty($pmatch) || ( strpos($key, $pmatch) === 0 ) ) { print "$key = $value<br />"; } it would be slightly faster -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/