-
Notifications
You must be signed in to change notification settings - Fork 57
coverting rain variable coming from db #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Use PDO to get the query in array format and assign that variable into the You can also use a DB wrapper such as RainFramework DB: On Tue, Jun 17, 2014 at 7:28 PM, Luffy-php notifications@github.com wrote:
|
thx for ur reply , |
All you've to do is to get the value of $site_name from the database: // I'm using RainFramework DB but you can use PDO or any other MySQL library // then you assign $site_name to your template: and into the template you simply use {$site_name}. <title>{$site_name}</title>On Sun, Jun 22, 2014 at 12:07 PM, Luffy-php notifications@github.com
|
|
use drawString then, here's an example: On Mon, Jun 23, 2014 at 8:15 AM, Luffy-php notifications@github.com wrote:
|
Thanks rain 👍 |
It should work, drawString works like draw with the only difference that the templates is coming from a string. Please explain more in details what you want to do and I'll help you to find a better solution. |
Thanks a lot friend |
You're passing variables to the template, those variables are rendered as $block_content = $this->drawString("your string here"); and then: My recommendation is to move from your database the business logic and the On Sun, Jul 6, 2014 at 4:29 PM, Luffy-php notifications@github.com wrote:
|
Thank you so much :) |
hey everybody
how can i convert variable coming from database ?
The text was updated successfully, but these errors were encountered: