I have the following coming out of a mySQL result:
$typeSort=$row['typeSort'];
$sortOrder=$row['sortOrder'];
What I need is an array created based on the $typeSort variable.
For example, if you do a search and get 100 results, there could be 20 that have $typeSort = 1 and 30 that have $typeSort = 2
I need in the results to have an if statement that will create an array if $typeSort is equal to 1, 2 or 3.
if($typeSort==1) {
$spa[$sortOrder]= "<p><a href=\"[login to view URL]$propertyID\">$propName</a><br />$address, $city, $state $zipCode</p>";
} else if($typeSort==2) {
$featured[$sortOrder]= "<p><a href=\"[login to view URL]$propertyID\">$propName</a><br />$address, $city, $state $zipCode</p>";
} else if($typeSort==3) {
$spaFeatured[$sortOrder]= "<p><a href=\"[login to view URL]$propertyID\">$propName</a><br />$address, $city, $state $zipCode</p>";
} else {
$listingBlock .= "<p><a href=\"[login to view URL]$propertyID\">$propName</a><br />$address, $city, $state $zipCode</p>";
}
$sortOrder will be the order that these need to be listed in.
I need to create the array if it meets that criteria and then sort the arrays by the sortOrder variable.
Let me know if you can do this and how much it would be.