Voting

: five minus one?
(Example: nine)

The Note You're Voting On

brett dot jr dot alton at gmail dot com
17 years ago
For the needle_before (first occurance) parameter when using PHP 5.x or less, try:

<?php
$haystack
= 'php-homepage-20071125.png';
$needle = '-';
$result = substr($haystack, 0, strpos($haystack, $needle)); // $result = php
?>

<< Back to user notes page

To Top