0

I have the following array:

Array
(
    [userid] => 1
    [alias] => rahul
    [firstname] => rahul
    [lastname] => Khan2
    [password] => Ý2jr™``¢(E]_Ø=^
    [email] => [email protected]
    [url] => 4cfe07dbf35d6.jpg
    [avatar_url] => 4cfe07efd2e1c.jpg
    [thumb] => 4cfe07ebc8955.jpg
    [crop_url] => 4cfe07dbf35d6.jpg
    [crop_position] => [100,100,200,200]
    [updatedon] => 0000-00-00 00:00:00
    [createdon] => 0000-00-00 00:00:00
)

I want to remove the element url ,and crop_url How i can i remove these from array.

2 Answers 2

7
unset($array['url'],$array['crop_url']);
Sign up to request clarification or add additional context in comments.

Comments

1

use unset

unset($arrayname['url']);

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.