Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php explode and get first value

$beforeDot = array_shift(explode('.', $string));
$beforeDot = current(explode(".", $string));

// PHP <= 5.3:
$beforeDot = explode(".", $string);
$beforeDot = $beforeDot[0];
 
PREVIOUS NEXT
Tagged: #php #explode
ADD COMMENT
Topic
Name
5+8 =