0

for some reason whenevever i try to pass 0 using a url parameter variable, on the other end it ends up as empty or null. How do i pass 0 from let's say page A to page B using url parameters?

In symfony
echo form_tag('application/recognition?step=0')?>

ends up being like

application/recognition

and step is lost, however if 0 is changed to 1 it does work.

Thanks..

4

2 回答 2

1

Check your code, make sure your page does not have "empty[$_GET['step']]"

When step=0, in php, empty[$_GET['step']] will return true which means step=0 is equal to step is empty.

So, if you have "empty[$_GET['step']]", your php page does not work when step=0

于 2015-06-20T03:35:57.357 回答
0

How are you checking for 0? It should be $_GET['param'] === '0'.

于 2012-08-24T16:00:56.553 回答