2

I want to upgrade to Zend Studio (currently using Netbeans), but I am slightly disappointed about how the formatter formats PHP in HTML attributes. Given this:

<tr bgcolor="<?php echo "red"; ?>">

Zend Studio will format it similar to this:

<tr bgcolor="<?php
echo "red";
?>">

Has anyone been able to change this behavior? Thank you,

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
Chris Laplante
  • 29,338
  • 17
  • 103
  • 134

2 Answers2

1

Have you tried using?

<tr bgcolor="<?= "red" ?>">
xordon
  • 5,523
  • 4
  • 18
  • 26
0

Few comments about the pros and cons of short tags here: PHP echo vs PHP short tags

Slightly off topic but I recommend you use CSS not bgcolour for your colours etc.

Community
  • 1
  • 1
Ric
  • 3,195
  • 1
  • 33
  • 51
  • Thanks for the link! I do use CSS, but I was feeling lazy so I ripped that snippet from the example project that comes with Zend Studio... so shame on them! ;) – Chris Laplante Mar 15 '11 at 20:58