> I really do not want to use them I just wanted to create
> midgard based site and thoght that I may use for example
> topic tree in url , but article id could be that way
> 1 or 2 or 5 or 15
> And argv[9] could be a string or integer.
> How You see switch for that?
> I gave up cause I thought that writing switch and cpntrol
> structures for that
> will take me too much time as for my php knowledge :)
well.. u cannot believe that the comuter will do some automagic work. U
have to have a plan :-) If dont know how many arg's u will have try
this:
http:/host.com/page/arg1_name/arg1_value/arg2_name/arg2_value
then you can parse theese pairs of name and value no matter how many of
them u pass.
<?
for ($i=0;$i<$argc;$i=$i+2)
eval ("$".$argv[$i]." = ".$argv[$i+1].";");
print "arg1_name= $arg1_name, arg2_name=$arg2_name";
?>
same should be if you switch pairs like:
http:/host.com/page/arg2_name/arg2_value/arg1_name/arg1_value
> yeah! I think I will be very impressed when I see them all after
> years :))
yeah..will be great..like watch episodes 4-6 of SW :-)
Solt
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]