RE: PHP debugger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Jason Pruim [mailto:japruim@xxxxxxxxxx]

> Morning,
>
> So looking at those scripts I realized that perl is nothing like php ;)
>
> Is there other info that the different places need? or is it just a
> different URL?
>
> I'm wondering why you could do something like:
>
> <?PHP
>
> switch(strtolower($ext)) {
> case 'es';
> case 'com.es';
> case 'org.es';
> case 'edu.es';
> case 'gob.es';
> 	$cmd = HTTP://www.myCool.es/?query="$nom.$ext";
> 	break;
> case 'eu';
> 	$cmd = HTTP://www.myCool.eu/?query="$nom.ext";
> 	break;
> default;
> 	$cmd = HTTP://www.whois.com/?query="$nom.ext";
> break;
> }
> ?>
>
> instead of calling out to a different script?
>
> Also, I noticed that in your script where you have "default:" in your
> switch, you have a : instead of a ;
>

Actually, the colon is correct: http://uk.php.net/switch

You also need to enclose your string declarations correctly and add the $
before ext, e.g.
$cmd = "http://www.whois.com/?query=$nom.$ext";;
or
$cmd = 'http://www.whois.com/?query='.$nom.'.'.$ext;

Edward


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux