stdClass Object
(
[campaign-ID] => 1
[campaign_name] => Sample Campaign
[start_duration] => 2012-04-17
[end_duration] => 2012-04-17
[activity$] =>
[survey_settings] => Ordering K-Cup Packs
[$limit] => sample
[$goal] =>
)
How to remove the – and $ ? using php?
Because - and $ sign is valid in mysql, but when I’ll try to display it using foreach, it wont work. So what should i do to remove that without editing the field names in the database table?
Am not sure where you got this class but there are so many invalid Naming here
Example
$goalcampaign-IDetc.I had to reconstruct your class and it looked like this
Output
I’ll advice you create more valid variables name rather than such conversions