Samson Gilkinson
asked on
CS6 Adobe Dreamweaver Alphanumeric list
Hello,
I have an issue with cs6 that i can not figure out. I have tried sorting with php, however it doesn't seem to work. I have spent 1 hour researching this and cannot find an answer to how to sort it, please help. I need to alphanumerically order this array.
var products =["Printer","Tablet","Rout er"];
I have an issue with cs6 that i can not figure out. I have tried sorting with php, however it doesn't seem to work. I have spent 1 hour researching this and cannot find an answer to how to sort it, please help. I need to alphanumerically order this array.
var products =["Printer","Tablet","Rout
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if you have array in php, after is the wrong syntax, and you can try this instead:
<?php
$products = array("Printer","Tablet","Router");
$clength = count($products);
echo "Before:<br>";
for($x = 0; $x < $clength; $x++) {
echo $products[$x];
echo "<br>";
}
sort($products);
echo "<br>After:<br>";
for($x = 0; $x < $clength; $x++) {
echo $products[$x];
echo "<br>";
}
?>
ASKER
Thanks man, I figured it out just after this but this should answer the question for others too.
what programming language is referring to as what showing above?