|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1998-02-12 01:04 UTC] rasmus
[2019-11-14 19:05 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 07:00:01 2025 UTC |
/* Here is the the setup of my vars, the array is loaded up in some sql code not represented here. It loads up fine */ $fieldstr = "id title prod_key filename bytes last_mod ". "loc_type status_type type_type ram hd_mb ". "sound_type mhz_type proc_type blurb"; $fieldarr = explode(" ", $fieldstr); $arraylen = count($fieldarr); /* This for loop does not put put a "<BR>\n" at the end of every line. */ for ($i = 0; $i < $arraylen; $i++) { $line = "$fieldarr[$i] = " . $$fieldarr[$i] . "<BR>\n"; print("$line"); } /* but the following does */ for ($i = 0; $i < $arraylen; $i++) { $line = "<BR>\n$fieldarr[$i] = " . $$fieldarr[$i]; print("$line"); } /* Any ideas? */