Jump to content


Photo

Array problem


  • Please log in to reply
2 replies to this topic

#1 timlondon

timlondon
  • Members
  • PipPipPip
  • Advanced Member
  • 52 posts

Posted 14 July 2006 - 08:50 PM

Hi guys,

If I have an array such as :

$cat[1] = "red";
$cat[2] = "green";
$cat[3] = "purple";
$cat[4] = "yellow";
$cat[5] = "pink";

If I then identify that I need to remove $cat[3] and $cat[4] is there a function I can use?

The array is much larger with anything between 60 and 100 and the content to be deleted would change according to different criteria.

#2 akitchin

akitchin
  • Staff Alumni
  • Advanced Member
  • 2,516 posts
  • LocationCalgary, AB, Canada

Posted 14 July 2006 - 08:53 PM

this topic was handled earlier today (very aptly) by crayon violent:

http://www.phpfreaks...c,100526.0.html

#3 timlondon

timlondon
  • Members
  • PipPipPip
  • Advanced Member
  • 52 posts

Posted 14 July 2006 - 09:15 PM

Exactly what I was looking for!

Thanks akitchin

:)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users