-2

I want to convert this array ["Sleep","Wake"] to string like this Sleep Wake .

What is the way to do this?

Fleur
  • 11

1 Answers1

1

Use implode,

$array = ['Sleep', 'Wake'];
var_dump(implode(" ", $array));
Shoyeb Sheikh
  • 2,659
  • 2
  • 10
  • 19