php: convert array variable to string? -


string converting array

<?php $value1 = "hello, world"; $convert = explode(" ",$value1);  echo $convert[1]; //hello echo $convert[2]; //world  // convert particular number of array  string $s = implode(" ", $convert[2]); ?> 

i want output : world error message:

error: warning: implode(): invalid arguments passed in

i tried, not done 1

if want output world, should work:

<?php      $value1 = "hello, world";     $convert = explode(", ",$value1);      //echo $convert[0]; //hello     echo $convert[1]; //world   ?> 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -