Untitled UI logotext
Solutions
WebsitesEcommerceMobile AppsWeb AppsProduction Support & Maintenance
Our work
Company
About usBlogPodcastContact us
Book a free consultation

Curly Braces in Mysql Queries

Olivia Rhye

I came across a few queries in our newest project and noticed a bunch of them injected their variable data inside curly braces.

I come to find out you can use this in any string in php to encapsulate whatever data you need. Whether it is a simple variable like $x = 0 or a part of an array or object. I happen to never be aware of this since I usually achieve the same results by popping out of the string to add my data, ex. $x = "My favorite baseball team is ".$fav_baseball_team."!". It really comes down to aesthetics but still interesting to know.

Ready to start a project?

Book a free consultation
Untitled UI logotext
Our work
About us
Blog
Careers
Submit a ticket
Agency Partnerships
Contact
© 2024 fjorge. All rights reserved.
Privacy