I am trying to create some canvases which pulls some text from a .txt file. My .txt contains on every line name, surname, gender and role separated by space. I want to create a new canvas for each row from my .txt file. This is how i thought to extract the values from my file:
$source = fopen('datas.txt', 'r') or die("Problem open file");
while (($data = fgets($source, 1000, " ")) !== FALSE)
{
$name = $data[0];
$surname = $data[1];
$gender = $data[2];
$role = $data[3];
}
fclose($source);
But i don't really know how to put them in a canvas. Can i make a loop or something to create a canvas for each row? I want some suggestions if someone can help me.