Salchester Posted June 20, 2007 Share Posted June 20, 2007 In PHP, is there anyway of using variables to store each piece of information (Name,Species,Sex) inside an array. Then, when it comes to fetching the information, the array position (e.g. 0) is called along with the information type (Name etc). A bit like the following: record(1).name The information is coming from the record array, at position 1 displaying names. Many Thanks, Link to comment https://forums.phpfreaks.com/topic/56440-php-arrays/ Share on other sites More sharing options...
emehrkay Posted June 20, 2007 Share Posted June 20, 2007 they are called associtative arrays $x = array('name' => 'Salchester', 'posts' => 1, 'status' => 'n00bie'); echo $x['name']; //echos Salchester ... Link to comment https://forums.phpfreaks.com/topic/56440-php-arrays/#findComment-278757 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.