How to generate the Curly bracket { from php---> display

Hi,
I have an addon in my website that help generate the HTLM code of a listing to post in Craigs List.
see example below:

<BODY><br />!BR(2}!!Rent(1650}!!Location(Yonge/Hwy 7}<br /> !settitle{!random{$ $ $|@ @ @|* * *| }2 Bed, 23 Oneida Cres, Move in:  Tenant-Oct25 !random{ $ $ $| @ @ @| * * *| }}<br /><center> 

if you notice !BR(2}, Rent and Location variables too, I was not able to generate the right side { curly bracket. so I generate a ( instead, and I have to change it manually to {.

any help please?

Thank you

Try using the HTML code for open brace {

oh this question brought me out of a semi retirement LMAO

ok so the problem is that the curly braces are not being treated as a comment in the double quotations, php is still trying to process what is inside the braces. There is a couple ways to go about this. You can do as andrew said and work around using html code or you can use \ backslash to escape the character but then the backslash is still left there, next the easy way to do it is to use single quotation marks on your echo statement

[php]
echo’ { } ';
[/php]
instead of double quotations
[php]
echo" { }";
[/php]

:wink:

Sponsor our Newsletter | Privacy Policy | Terms of Service