Invalid argument supplied for foreach() when using parser |
hello.
is there already a solution here? i have the same problem. in the ci4 documentation the example does not work either. greeting, mike https://codeigniter4.github.io/userguide...ight=parse the following example from the documentation sends folgwenden error: CRITICAL - 2020-02-19 14:50:57 --> Invalid argument supplied for foreach() $template = '{name} lives in {location}{city} on {planet}{/location}.'; $data = [ 'name' => 'George', 'location' => [ 'city' => 'Red City', 'planet' => 'Mars' ] ]; echo $parser->setData($data)->renderString($template); // Result: George lives in Red City on Mars. |
Messages In This Thread |
Invalid argument supplied for foreach() when using parser - by SkyRipper - 01-23-2020, 12:41 AM
RE: Invalid argument supplied for foreach() when using parser - by kilishan - 01-26-2020, 10:31 PM
RE: Invalid argument supplied for foreach() when using parser - by SkyRipper - 01-28-2020, 01:20 AM
RE: Invalid argument supplied for foreach() when using parser - by MikiStoni - 02-19-2020, 02:34 PM
RE: Invalid argument supplied for foreach() when using parser - by zahhar - 02-24-2020, 02:42 PM
RE: Invalid argument supplied for foreach() when using parser - by germanosk - 02-07-2021, 05:58 PM
RE: Invalid argument supplied for foreach() when using parser - by SkyRipper - 02-23-2020, 07:49 PM
RE: Invalid argument supplied for foreach() when using parser - by JohnyR - 02-16-2021, 02:18 AM
RE: Invalid argument supplied for foreach() when using parser - by MikiStoni - 03-11-2020, 09:53 AM
|