Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2003022

[PHP] adding to an array From: rdkurth <email protected>
Date: 02/23/03

Hello ,

I need a way to read the following text file and add to or delete from
or change the data.
I have been able to move it all into an array using this code
$groups= file("group");
for ($i=0; $i<$number_in_group; $i++){
}
But I can not figure out how to search the array and delete from or add
to the array at a given point. I would like to say add another user to
the end of site6 or delete a user from site3.
Could sombody give me a hand here. I have read the manual for arrays
and still can't figure it out.

site1:x:503:tester1
site2:x:504:tester2,tester2a
site3:x:505:tester3,tester3a,tester3b
site4:x:506:tester4
site5:x:507:tester5,tester5a,tester5b
site6:x:508:tester6
site7:x:509:tester7,tester7a,tester7b

-- 
Best regards,
 rdkurth                          mailto:rdkurth <email protected>

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php