php arrays (call it coding if that helps)
Posted: 27 Sep 2008, 17:51
Hi all,
I'm kind of stuck on a php problem:
$a = array();
$a[] = array( "name"=>"peter", "city"=>"odense" );
$a[] = array( "name"=>"lars", "city"=>"copenhagen" );
$a[] = array( "name"=>"bo", "city"=>"aarhus" );
what I want to do is delete the array in $a that has for example a name="peter", so
the whole array that contains name peter is removed from $a
anyone know how this is done?
regards,
Peter
I'm kind of stuck on a php problem:
$a = array();
$a[] = array( "name"=>"peter", "city"=>"odense" );
$a[] = array( "name"=>"lars", "city"=>"copenhagen" );
$a[] = array( "name"=>"bo", "city"=>"aarhus" );
what I want to do is delete the array in $a that has for example a name="peter", so
the whole array that contains name peter is removed from $a
anyone know how this is done?
regards,
Peter