Wednesday, 6 August 2014

laravel

Hai i need to retrieve a Mobilenumber in a  mysql database using php laravel  for sending sms.

I use the below code in the controller in php laravel
$number=DB::select('select Mobilenumber from users where id=?',array(2));
$contacts=$number;
return $contacts;

output:
  the above code retrieve data as
{{'Mobilenumber':'0000000000'}}

i need only the number from above output so please provide me a solution .

Thanks in advance