Hey...So I have a function which breaks up a string..I would like to echo just a part of it...but it isnt working...how do I go about doing what I am trying to do 🙂
here is my code to give you an idea:
if($probe->getData() != null){
echo nodeEcho($probe->getData());
}
function nodeEcho($str){
$array= split('.',$str,2);
return $array[0];
}
So each piece of data looks like this:
'2. Electronic Industries Association (EIA)'
and I would like to deliminate each string at the period...(but I would like to include the period as well)
so I would want to echo '2.'
thanks!