Posted by Erlend Klakegg Bergheim on 10/10/31 11:52
Jarrod skrev:
> Hi there,
>
> I am trying to get the value of the varible into an if statment that will
> determine what to do.
>
> The value is from the end of an array, this works fine when i use echo to
> print it out onto the page but cant pass the value into the if statement,
> can someone please help me
>
> $testing = '10';
> $end = end($array); // this would equal to 10
>
>
> if($testing == $end){
> print 'yes';
> }else{
> print 'no';
> }
What about this?
if((int)$testing == (int)$end){
--
Vennlig hilsen
Erlend Klakegg Bergheim
Navigation:
[Reply to this message]
|