Home php How to remove specific value from php array?

How to remove specific value from php array?

by Shahriar Sagor

Today now in this post we will know about how to remove specific value from php array. When we are working on our code on PHP project, at that time some times we need to remove any specific items value from our array. Some times we did google search and solve that. But here i would like to share with you my site how to remove any value from array. So, let’s start and see how to use:

Example:

$myArray = array('php', 'laravel', '.net', 'java', 'c#', 'javascript');
$myArray = array_diff($myArray, array('laravel'));
print_r($myArray);

Read Also : Laravel Where Clause with Mysql Function Example

Thanks for read. I hope it help you. For more you can follow us on facebook.

close

You may also like