> In ASP, you can have something like:
>
>
> <%
> select case something
> case "this" do that
> case "those","them" do other
> case "crap","doesn't matter","whatever" do nothing
> case else print error
> end select
> %>
>
>
> IN PHP you can't do cases like that, because like in C, u must have
switch($something)
{
case "this":
do this;
break;
case "those":
case "them":
do other;
break;
case "crap":
case "doesn't matter":
case "whatever":
do nothing;
break;
default:
print error;
}
>
> <%
> select case something
Same as C
switch($something)
{
case "this": do that;break;
case "those":case "them": do other; break
...
default: print error
}
Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org
--
PHP General Mailing List (http://www.php.net
In ASP, you can have something like:
<%
select case something
case "this" do that
case "those","them" do other
case "crap","doesn't matter","whatever" do nothing
case else print error
end select
%>
IN PHP you can't
4 matches
Mail list logo