I get the following error when running the following PHP code
class tableData
{
private $row1 = array("Kalle1", "address1", "postal code1", "1@email.se", "070111001", "08111001");
private $row2 = array("kalle2", "address2", "postcode2", "2@email.se", "070111002", "08111002");
private $row3 = array("kalle3", "address3", "postcode3", "3@email.se", "070111003", "08111003");
private $row4 = array("kalle4", "address4", "postcode4", "4@email.se", "070111004", "08111004");
private $rader = array(array($row1),array($row2),array($row3),array($row4));
}
The error corresponds to the variable $rader:
Parse error: syntax error, unexpected '$ row1' (T_VARIABLE) waiting ')' in C: \ xampp \ htdocs \ test_k.php on line 15
Can someone help me fix this error?
source
share