One of my class' function outputs a text, something from my mysql db. But i couldn't explode() it since explode needs a string parameter. How to change it to a string.
class admin{
//constructor code
public function department_retrieve(){
//some code to retreive $this->old_department
echo $this->old_department;
}
}
$obj = new admin();
$obj->department_retrieve();
$obj->department_retrieve() outputs a text. I want something to explode the text by spaces. What i miss? How to make it a string? Please help.
Aucun commentaire:
Enregistrer un commentaire