update page now
Longhorn PHP 2026 - Call For Papers

Voting

: three minus zero?
(Example: nine)

The Note You're Voting On

n-regen
17 years ago
If you only know a part of a value in an array and want to know the complete value, you can use the following function:
<?php
function array_find($needle, $haystack)
{
   foreach ($haystack as $item)
   {
      if (strpos($item, $needle) !== FALSE)
      {
         return $item;
         break;
      }
   }
}
?>
The function returns the complete first value of $haystack that contains $needle.

<< Back to user notes page

To Top