Jump to content

[SOLVED] insert data into an array


Roy Barten

Recommended Posts

I created an array with some data in it. Is it possible to create an array and to fill in the data later? For example:

 

First i want to fill in a start and enddate into the array and later i want to fill in an id into this array

 

Is this possible? and how do i do this?

Link to comment
https://forums.phpfreaks.com/topic/145734-solved-insert-data-into-an-array/
Share on other sites

just add NULL on the position u dont need, and replace it when the time is right.

For example :

 

U want finally

name age sex

 

U first make array

$person = array('Steven',NULL,'male');

 

Then when the time is right u add the age

$person[1] = '24'; (2nd position)

Archived

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

×
×
  • 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.