- strpos: documentation ( source)
- print_r: documentation ( source)
- array_values: documentation ( source)
- explode: documentation ( source)
<?php
$newstring = 'Volvo Trucks - Rajnikanth - The Epic Split feat. (Live Test 6) @xyz Thalaivar Epic Split Rajanikanth Rajinikanth Rajani Auto Auto rikshaw and also @xyz.abc http://another.net @bac.def this is tesging @pqr ';
$array = explode(" ", $newstring);
$result=array();
foreach($array as $key=>$value)
{
if( strpos($value, '@', 0) == 0 && strpos($value, '@', 0) === 1)
$result[$key] = $value;
}
$result = array_values($result);
print_r($result);
echo "--".strpos($array[13], '@', 0);
?>