Jump to content


Photo

Array Question


  • Please log in to reply
2 replies to this topic

#1 $cripts

$cripts
  • Members
  • PipPipPip
  • Advanced Member
  • 33 posts

Posted 06 March 2006 - 08:02 PM

OK heres my problem i have an array containing like so
$array = array("Tony" => "Him", "Timothy" => "His");
and when i need to update that array after a bit dynamicaly to be say
$array = array("Tony" => "Him", "Timothy" => "His", "Sarah" => "Her", "Racheal" => "Hers");
and im stuck on something so simple.... help will be appreciated.

#2 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 06 March 2006 - 08:08 PM

Just add the indices like so:
<?php
$array['Sarah'] = 'Her';
$array['Racheal'] = 'Hers';
?>

Ken

#3 $cripts

$cripts
  • Members
  • PipPipPip
  • Advanced Member
  • 33 posts

Posted 06 March 2006 - 08:19 PM

ty




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users