On Sunday 24 February 2002 04:03, jtjohnston wrote:
> I'm splitting mysql entries to build an array of author names called
> $authors.
>
> > As someone already suggested, you could use:
> > array_push($authors, explode(";", $mydata->AS));
>
> http://ccl.flsh.usherb.ca/db/authors_under_study.php
>
I'm splitting mysql entries to build an array of author names called $authors.
> As someone already suggested, you could use:
> array_push($authors, explode(";", $mydata->AS));
http://ccl.flsh.usherb.ca/db/authors_under_study.php
It works, but still gets "First argument to array_push() needs t
Let's work on some debugging. By using mysql_error()
you'd eventually find out that AS is a reserved word
in mysql, see:
http://www.mysql.com/doc/R/e/Reserved_words.html
That said, here's some example code to play with,
untested but should work.
if (!$conn = mysql_connect($host, $user, $
On Saturday 23 February 2002 14:43, jtjohnston wrote:
> OK. I use:
>
> while ($mydata = mysql_fetch_object($news))
> {
> $authors = explode(";", $mydata->AS);
> }
>
> Then why "Invalid argument supplied for foreach()"
Have you checked that $authors is indeed an array? Try print_r($authors), i
4 matches
Mail list logo