Jump to content

Recommended Posts

Hi,

thanks thats great just what i wanted. But as i am new to php could you explain what the line -

unset($a[array_search($remowe,$a)]);

means. i know it searches the array for the value but, i have never come across 'unset' before. is it basically just delete from varible $a and can it only be used with arrays?

thanks

john
unset is to unset() a varable

when you use the code below your only see one echoed redarrow
as the seconed ecohed redarrow is unset.

good luck.
[code]
<?php
// name is redarrow
$name="redarrow";
/// echo the name redaarow
echo $name;
//unset varable $name what was redarrow
unset($name);
// echo name now nothink why becouse we unset the varable........
echo $name;
?>
[/code]
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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