On Wed, Jun 6, 2012 at 10:25 AM, ying yang <yingyang99999@gmail.com> wrote:
Parse error: syntax error, unexpected ']' in /var/www/cakephp/app/View/Profiles/view.ctp on line 14
i tried your code.On Wed, Jun 6, 2012 at 10:18 AM, Michael Gaiser <mjgaiser@gmail.com> wrote:
You probably are looking for something like this.
<th>Name</th>
<h3>Employee</h3>
<table>
<tr>
<th>Age</th>
<th>Hired</th>
</tr>
<?php foreach($data as $profile): ?>
<tr>
<td><h1><?php echo sprintf("%s %s %s",
$profile]['Profile']['fname'], $profile['Profile']['mname'],
$profile['Profile']['lname']);?></h1></td>
<td><p><?php echo $profile['Profile']['age']?></p></td>
<td><p><?php echo $profile['Profile']['date_hired']?></p></td>
</tr>
<?php endforeach; ?>
</table>
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment