Jump to content

Archived

This topic is now archived and is closed to further replies.

$cripts

Array Question

Recommended Posts

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

Share this post


Link to post
Share on other sites
Just add the indices like so:
[code]<?php
$array['Sarah'] = 'Her';
$array['Racheal'] = 'Hers';
?>[/code]

Ken

Share this post


Link to post
Share on other sites

×

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.