You are here: Re: parsing phone numbers « PHP Programming Language « IT news, forums, messages
Re: parsing phone numbers

Posted by Krustov on 05/09/07 12:21

<comp.lang.php>
<Toby A Inkster>
<Wed, 9 May 2007 09:53:03 +0100>
<foe8h4-8oj.ln1@ophelia.g5n.co.uk>

> > $jazz, $junk, $zdummy, $qaz, $zstring, $gimmie
>
> WTF?! This isn't Scrabble[TM]; you don't get bonus points for including Z,
> Q and J in your variable names.
>
> As far as I can tell, your entire 40-line include file can be replaced with:
>
> $p = preg_replace('/[^0-9]/', '', $p);
>
> which is only 40 characters.
>

The $ok string can contain any characters and its a lot easier and
faster to duplicate/rename the file than it is to learn expressions .

$toby seems like a good variable name .

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация