Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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