Cianz Posted April 11, 2008 Share Posted April 11, 2008 Hi - i've read 3 array tutorials now over the last 4 hours but still can't find out how to read the information in the array. Basically I have an array that looks like this; Array ( [google.com] => Array ( [0] => 0 [1] => 29.95 ) ) [0] will return 0 or 1 depending on wether the domain is available [1] will return the price of the domain registration All I want to do is check the value of [0] and tell the user wether the domain is available or not. Any help appreciated ??? Link to comment https://forums.phpfreaks.com/topic/100566-check-value-in-array/ Share on other sites More sharing options...
doni49 Posted April 11, 2008 Share Posted April 11, 2008 $myArray["google.com"][0] = 0; $myArray["google.com"][1]=29.95; $myArray["mygoogle.com"][0] = 1; $myArray["mygoogle.com"][1]=39.95; echo $myArray["google.com"][0]; //will return 0 echo $myArray["google.com"][1]; //will return 29.95 echo $myArray["mygoogle.com"][0]; //will return 1 echo $myArray["mygoogle.com"][1]; //will return 39.95 Link to comment https://forums.phpfreaks.com/topic/100566-check-value-in-array/#findComment-514337 Share on other sites More sharing options...
Cianz Posted April 11, 2008 Author Share Posted April 11, 2008 Thanks doni49, that worked perfectly. Link to comment https://forums.phpfreaks.com/topic/100566-check-value-in-array/#findComment-514654 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.