how do i define a constant in a string in PHP?

heathzepadio

New Member
I am using a constant \[code\]NEWS_POST_NUMBER\[/code\] and i am getting confused on how to attach it to a string to query it to database. i tried many things and it is giving errors.here is the string i tried.\[code\]$query = "SELECT news.id, news.timestamp, news.title FROM news ORDER BY id DESC LIMIT $from, NEWS_POST_NUMBER";\[/code\]please note \[code\]NEWS_POST_NUMBER\[/code\] is the constant i have defined i want to attach it to query how do i do it?
 
Back
Top