Fatal error: Uncaught Error: Call to undefined function requrie_once() in /home/vol6_1/epizy.com/epiz_24304864/htdocs/index.php:2 Stack trace: #0 {main} thrown in /home/vol6_1/epizy.com/epiz_24304864/htdocs/index.php on line 2

hey im trying to make my first ever php site and i cant get php code to show up and this its the error massage “Fatal error : Uncaught Error: Call to undefined function requrie_once() in /home/vol6_1/epizy.com/epiz_24304864/htdocs/index.php:2 Stack trace: #0 {main} thrown in /home/vol6_1/epizy.com/epiz_24304864/htdocs/index.php on line 2” i will be very happy if someone can help

Correct requrie_once with require_once on index.php on line 2.

thanks for the quick replay but now i get this error ‘’ Uncaught Error: Call to undefined function required_once() in /home/vol6_1/epizy.com/epiz_24304864/htdocs/functions.php:2 Stack trace: #0 /home/vol6_1/epizy.com/epiz_24304864/htdocs/index.php(2): require_once() #1 {main} thrown in /home/vol6_1/epizy.com/epiz_24304864/htdocs/functions.php on line 2’’
i have tryed to type requred_once in my funtions.php

Correct required_once with require_once on functions.php on line 2.

hey again, i get this error and oi cant find the problem Warning : Invalid argument supplied for foreach() in /home/vol6_1/epizy.com/epiz_24304864/htdocs/functions.php on line 48

What is the argument you are trying to use for the foreach function?

my code

  foreach ($items as $item ) {
     $itemUrlName = strtolower( $item['name'] );
     $itemUrlName = str_replace( ' ', '-', $itemUrlName );
     $item['link_to_fn_item'] = 'https://fortnitetracker.com/locker/' . $item['manifestId'] . '/' . $itemUrlName;
     $sortedItems[$item['storeCategory']]['items'][] = $item;

  }

Did you also learn how to use the foreach() loop function?

also what value is $items ?:eyes:

1 Like

Check the PHP manual here

For the issues above check require_once and foreach.

These type of questions are usually written on platforms like StackOverflow and before running PHP scripts online you should first test them on your local web server.

For more information about local web servers look here.

Good luck!

1 Like