new to PHP doubt about explode()

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Albertogomes
New php-forum User
New php-forum User
Posts: 2
Joined: Tue Oct 30, 2012 8:28 am

new to PHP doubt about explode()

Postby Albertogomes » Tue Oct 30, 2012 8:40 am

while (!feof($ficheiro)){
$produto=fgetcsv($ficheiro);
echo = $produto[0];
echo = $produto[1];


i split $ficheiro into products and prices. when i do echo = $produto[0] the products are all together
(milkwatercheeseegg) and i can´t split them with explode function because they dont have " " or "," or anything beetween them. Can someone tell me how to slip them? if i write echo $produto[0]."<br>" ;
milk
water
cheese
egg , but e cant put the separatly on an array. Thanks and sorry english isn't my first language :P

Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 1 guest

cron