Jump to content

updating field


iversonm

Recommended Posts

so if

i pull data from a database and use

$array=explode("\n", $log);

// and the array would equal this$array=array('this is the first', 'this is the second', 'this is the third', 'those are all lines');

 

so lets say i want to update the array i know that if i wanted to add a new row i would just do this

$newlog="this is a new line\n".$oldlog;

right ok so that works fine, but lets say i want to use $array and update the first line

so lets say i want to make the first row this

$array[0]="this is the new first row"; but i want all the past things from $array to stay the same

how would i do this?

 

Link to comment
https://forums.phpfreaks.com/topic/125400-updating-field/
Share on other sites

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.