I have tried creating a list within a container in PHP and I am struggling because it's my first time doing a list in PHP. I want the list within the container to look like an example I found on http://getbootstrap.com/components/#list-group this example is under "List Group" then it's the "Linked Items" example.
My code:
// List
echo_lines(array(
// All cases
"<ul>",
"<div class='row'>",
"<div class='col-md-6'>",
"<div class='panel panel-default'>",
"<div class='panel-heading clearfix'>",
"<h4 style='margin:0; margin-top:5px; padding:0;'>All Projects</h4>",
"</div>",
"<div class='panel-body'>",
// Content
"<div class='list-group'>"
"<a href='#' class='list-group-item'>"Orange"</a>"
"<a href='#' class='list-group-item'>"Pizza"</a>"
"<a href='#' class='list-group-item'>"Beef"</a>"
"<a href='#' class='list-group-item'>"Chicken"</a>"
"</ul>",
The code you gave us is way to messy. You don't close most of the html tags, and I'm not sure what you're trying to achieve
Here is the example from bootstrap documentation that you linked, more or less mixed with your code. I'm still not sure if "Orange", "Beef", "Pizza" and "Chicken" are just string or you want to use variables (since you escaped them on your code)
$str = "";
$str .= '<div class="list-group">';
$str .= ' <a href="#" class="list-group-item active">Orange</a>';
$str .= ' <a href="#" class="list-group-item">Beef</a>';
$str .= ' <a href="#" class="list-group-item">Pizza</a>';
$str .= ' <a href="#" class="list-group-item">Chicken</a>';
$str .= ' <a href="#" class="list-group-item">' . $variable . '</a>'; // this is an example, if you want to use variable
$str .= '</div>';
echo $str;
If you want to use "
or '
into a string, you have to escape it with a backslash \
depending on how you write your string.
Example :
$str = "";
$str .= 'Here you can use "double quotes" without escaping<br />';
$str .= "There you will need to escape \"double quotes\"<br />";
$str .= 'There you will need to escape \'simple quotes\'<br />';
$str .= "There, escaping 'simple quotes' is unnecessary";
More info at PHP: Strings manual