$html = '' . $var1 . '' . $var2;
$html = str_replace("\\r\\n", "", addslashes(trim($html)));
$html = str_replace(PHP_EOL,"",$html);
$html = str_replace(array("\r", "\n"), '', $html);
il PHP alle volte è veramente ostico.
$html = '' . $var1 . '' . $var2;
$html = str_replace("\\r\\n", "", addslashes(trim($html)));
$html = str_replace(PHP_EOL,"",$html);
$html = str_replace(array("\r", "\n"), '', $html);
<?class People {
/** @Id */ protected $id;
/** @String */ protected $name;
/** @String */ protected $surname;
..etc.. etc...
}
/** * @Document */class Student extend People {
/** @String */ protected $course;
/** @String */ protected $year;
..etc.. etc...
}
/**
* @Document
*/
class Customer extend People {
/** @String */
protected $code;
/** @String */
protected $name;
..etc.. etc...
}
/** * @Document */class MixedPeople {
/** @Id */
protected $id;
..etc.. etc...
}
foreach ($products AS $product)
if (count($categories) AND Product::idIsOnCategoryId($product['id_product'], $categories))
$totalAmount += $useTax ? $product['total_wt'] : $product['total'];
foreach ($products AS $product)
if (count($categories) AND Product::idIsOnCategoryId($product['id_product'], $categories))
$totalAmount += $product['total'];
//$totalAmount += $useTax ? $product['total_wt'] : $product['total'];