Current location: Hot Scripts Forums » Programming Languages » PHP » asort() function....getting syntax errors


asort() function....getting syntax errors

Reply
  #1 (permalink)  
Old 02-25-05, 01:15 PM
developer_x's Avatar
developer_x developer_x is offline
Newbie Coder
 
Join Date: Feb 2005
Location: Men are from Mars
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
asort() function....getting syntax errors

have an associative array which has mutliple dimensions (products_id, products_price, products_name). I want to sort it alphabetically w.r.t the products_name.

I found this function in the php manual :
void asort (array array [, int sort_flags])

I am sure i am using the right functions for sorting. But somehow I am getting syntax errors.


asort($new_products [, SORT_STRING] ); ///this is line no 30
reset($new_products);


The error is:

Parse error: parse error, unexpected ',', expecting ']' in c:\web\rl\mopics3\includes\boxes\all_products.php on line 30

I tried using different ways of using the same function but I still get syntax errors.
Any help would be greatly appreciated.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 02-25-05, 01:20 PM
bizzar528's Avatar
bizzar528 bizzar528 is offline
Community Liaison
 
Join Date: Sep 2004
Location: Pennsylvania, US
Posts: 1,551
Thanks: 2
Thanked 16 Times in 15 Posts
me thinks posting your code from the area that's causing the problem might yeild an answer.
__________________
Yep, it's a signature...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 02-25-05, 03:10 PM
developer_x's Avatar
developer_x developer_x is offline
Newbie Coder
 
Join Date: Feb 2005
Location: Men are from Mars
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
sorry. I didnt' get you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scrollbar!!!!!! LiLSweetie HTML/XHTML/XML 8 07-22-04 06:01 PM
PHP Error Fairnie PHP 8 06-26-04 08:15 AM
Disable form fields to be submitted RickyRod JavaScript 2 05-24-04 11:15 AM
accessing existing ISP email with a PHP webmail script. nlancaster PHP 1 01-07-04 04:28 AM
Help trim code down TheLaughingBandit JavaScript 0 09-02-03 10:50 AM


All times are GMT -5. The time now is 09:04 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.