Jump to content

Recommended Posts

Hello, I've been doing php stuff for a couple years now so I'm rather confused as to why this does not work,
The main goal is to get a string with values separated by commas into an array and then for each value request a url specific to that value
heres the code I've made up, very simple (note that the string is a small sample of the actual string, which is something like 250 values)
[code]
<?
$csv = "21 Grams 2003,
2009 Lost Memories 2002,
2046 2005,
The 40-Year-Old Virgin 2005,
Adrenaline Drive 2000,
Advertising Rules 2001"

$dvds = explode("," , $csv);
foreach($dvds as $row){
include("http://mikwit.com/dvds/add.php?title=" & $row);
}
?>
[/code]

I really thought it would work, but i get a "Parse error: parse error, unexpected T_STRING in /homepages/23/d114411700/htdocs/dvds/dvds.php on line xxx" with the line being that of "$dvds = explode("," , $csv);"
Link to comment
https://forums.phpfreaks.com/topic/28537-explode-help/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.