Jump to content

theblazingangel

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

theblazingangel's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. help! why does the text get printed when checking array entry 0? it doesnt for any of the other array entries and shouldnt ever be printed... [code]<?php $test = array("data1","data2","data3"); $rowNum = "none"; foreach ($test as $row => $data) { if ($data == "data1") { $rowNum = $row; } } if ($rowNum == "whatever") { echo "error"; } ?>[/code] if you replace [i]if ($data == "data1")[/i] with [i]if ($data == "data2")[/i] it doesnt happen nor if you replace [i]whatever[/i] with a number software bug? im using php v5.1.5 btw and it also happened on v5.1.4 thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.