Jump to content

Problem...


Recommended Posts

Hey.

 

I can't find the problem on this:

 

<?php

$fruits = array ('red'             =>  'apple',
                          'orange'      =>   'orange',
		  'yellow'       =>   'banana');
		  
foreach ($fruits as $fruit_key => $fruit_value)    {

              echo sorta($fruit_key.' - '.$fruit_value. '<br />'));
      
      }
      
?>	      

 

 

but it is giving me a error.

Link to comment
https://forums.phpfreaks.com/topic/58859-problem/
Share on other sites

OK. The error message is pretty explicit. The function named sorta() is not defined.  Unless you defined it yourself elsewhere in some code, you can only use functions that are supported by your installed version of php.

 

As always, the manual is very useful - http://ca.php.net/manual/en/function.sort.php  ;)

Link to comment
https://forums.phpfreaks.com/topic/58859-problem/#findComment-292086
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.