\n\n\n\n"; $html .= "Company Name | Stock Symbol | Percentage Change | \n \n"; $color = "#000000"; // $color is set to green if we have an appreciation in value ("+" present in $results['changePercent']) if (preg_match("/^\+/", $results['changePercent'])) $color = "#00CC33"; // else it is set to red if we have a depreciation ("-") if (preg_match("/^-/", $results['changePercent'])) $color = "#FF0000"; $html .= "\n" . $results['company'] . " | " . $results['symbol'] . " | " . $results['changePercent'] . " | \n \n"; $html .= " \n | \n
\n