onclick in php echo with error invalid unexpected token

后端 未结 2 2109
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-21 12:59

I\'m trying to add the onclick funtion when user checked the check box, and then the total price will be shown.
All the information including price is retrieve from databas

2条回答
  •  醉酒成梦
    2021-01-21 13:13

    Why would you use so much '\' ? and what the asterisks '*' after total() for? I have tried following snippet and it seems to works well. (only changing the echo line in your php code)

    echo "\t
    ".filter_var($event['eventTitle'], FILTER_SANITIZE_SPECIAL_CHARS)." {$event['eventStartDate']} {$event['eventEndDate']} {$event['catDesc']} {$event['venueName']} {$event['eventPrice']}
    \n";

提交回复
热议问题