Talk About Network

Google


Giganews Newsgroups




Programming > PHP Language > the usort 's pu...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 4484 of 4882
Post > Topic >>

the usort 's puzzle

by youngord@[EMAIL PROTECTED] Sep 30, 2007 at 03:41 AM

<?php
$mix=array(
              array("A",10),
              array("B",5),
              array("C",100)
           );
function com($x,$y){
echo $x[0];
}

usort($mix,'com');

?>

i think the $x[0] result is A,
but the final $x[0] result is BC.
why???
 




 2 Posts in Topic:
the usort 's puzzle
youngord@[EMAIL PROTECTED  2007-09-30 03:41:29 
Re: the usort 's puzzle
Erwin Moller <Since_hu  2007-10-01 11:09:35 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Sat Jul 4 13:48:01 PDT 2009.