0

I have the following code which I use in PHP-Liquid template engine. I want the ability to add or delete rows trough phpMyAdmin instead of adding/deleting new arryas. So I need to use MySQL, but how should I proceed to work it out with my example?

$assigns = array(
        'blog' => array(
                    array(
                        'title' => 'Blog Title 1',
                        'content' => 'Nunc putamus parum claram',
                        'tags' => array('claram', 'parum'),
                        'comments' => array(
                                        array(
                                            'title' => 'First Comment',
                                            'message' => 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr'
                                            )
                                    )
                        )

                    )
        );

print $liquid->render($assigns);

Edited by sigvewinter

2
Contributors
1
Reply
19
Views
3 Years
Discussion Span
Last Post by broj1
0

If the array that is sent as a parameter to the $liquid->render() method has to have same form as teh $assigns array then you have to read the data from the database and put it into an array of the above mentioned form. The details depend on the table structures and on the query that reads the data.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.