Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology


 
 
LinkBack Thread Tools
Old 06-30-2004, 02:32 PM   #1 (permalink)
Psycho
 
FaderMonkey's Avatar
 
Location: Orlando, FL
[PHP/MySQL] I'm new at this...please be nice

I'm getting this error:

Quote:
Parse error: parse error, expecting `','' or `';'' in /home/dtlott/public_html/test/index4.php on line 100
For this line of code:

Quote:
echo "<font face="skia"><b>$entrytitle</b></font>";
It's only happening when I use those FONT tabs. When I take them out, it's fine. Am I not allowed to use those there?
FaderMonkey is offline  
Old 06-30-2004, 02:37 PM   #2 (permalink)
Junkie
 
You need to escape double quotes with backslashes in a string you declare between double quotes:

Code:
echo "<font face=\"skia\"><b>$entrytitle</b></font>";
SinisterMotives is offline  
Old 06-30-2004, 02:39 PM   #3 (permalink)
Junkie
 
By the way, your HTML is obsolete. Do this instead:

Code:
echo "<span style=\"font-family: skia, sans-serif; font-weight: bold;\">$entrytitle</span>";
SinisterMotives is offline  
Old 06-30-2004, 02:43 PM   #4 (permalink)
Psycho
 
FaderMonkey's Avatar
 
Location: Orlando, FL
Thank you, thank you, thank you!! I'm just learning how to do this and I read about that a couple days ago. I should have known that.

Thank you again!
FaderMonkey is offline  
Old 06-30-2004, 02:46 PM   #5 (permalink)
Psycho
 
FaderMonkey's Avatar
 
Location: Orlando, FL
What's the difference between using these two?

Quote:
echo "<font face=\"skia\"><b>$entrytitle</b></font>";

and

echo "<span style=\"font-family: skia, sans-serif; font-weight: bold;\">$entrytitle</span>";
FaderMonkey is offline  
Old 06-30-2004, 03:53 PM   #6 (permalink)
Junkie
 
The difference is that the latter should continue to work in new browser versions for a long time to come, while the former will presumably stop working at some point. That applies mainly to the font tags. The bold tags will probably be always be valid. Moreover, you can eliminate bloated code by putting the font properties in a CSS class and replacing the style attribute with a class attribute in all elements that you want to apply those style rules to.
SinisterMotives is offline  
Old 07-01-2004, 02:42 PM   #7 (permalink)
Fluxing wildly...
 
MrFlux's Avatar
 
Location: Auckland, New Zealand
By the way, if you're using a colour highlighting editor, this would probably be easier to read:

PHP Code:
<?php
echo '<span style="font-family: skia, sans-serif; font-weight: bold;">'.$entrytitle'.</span>';
// as opposed to
echo "<span style=\"font-family: skia, sans-serif; font-weight: bold;\">$entrytitle</span>";
?>
But whatever you want to use as long as you remember to only use double quotes if you want the string parsed for variables, otherwise ' is faster.
__________________
flux (n.)
Medicine. The discharge of large quantities of fluid material from the body, especially the discharge of watery feces from the intestines.
MrFlux is offline  
Old 07-01-2004, 03:08 PM   #8 (permalink)
Follower of Ner'Zhul
 
RelaX's Avatar
 
Location: Netherlands
So how is this MySQL related?
__________________
The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents.
- Nathaniel Borenstein
RelaX is offline  
Old 07-01-2004, 03:50 PM   #9 (permalink)
Junkie
 
Quote:
Originally posted by MrFlux
By the way, if you're using a colour highlighting editor, this would probably be easier to read....
I'm using UltraEdit32. It highlights a lot of languages, but PHP isn't one of them. I can get some highlighting if I set it to highlight PHP as Perl, but it's hit-and-miss. Is there an add-on PHP language file for UltraEdit?
SinisterMotives is offline  
Old 07-01-2004, 04:03 PM   #10 (permalink)
beauty in the breakdown
 
Location: Chapel Hill, NC
I would suspect so, but I cant comment on it... I do know that TextPad has a PHP syntax file though.

Maybe look at http://sourceforge.net/projects/php4ue/
__________________
"Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws."
--Plato
sailor is offline  
Old 07-01-2004, 04:11 PM   #11 (permalink)
Junkie
 
Thanks, Sailor. That looks like it's exactly what I want.
SinisterMotives is offline  
Old 07-01-2004, 04:30 PM   #12 (permalink)
Fluxing wildly...
 
MrFlux's Avatar
 
Location: Auckland, New Zealand
Crimson Editor has built in PHP support.

I'm currently using Nusphere PHPEd, which is really nice apart from a few bugs, although my trial is about to run out.
__________________
flux (n.)
Medicine. The discharge of large quantities of fluid material from the body, especially the discharge of watery feces from the intestines.
MrFlux is offline  
Old 07-02-2004, 05:44 AM   #13 (permalink)
beauty in the breakdown
 
Location: Chapel Hill, NC
Yeah, I have yet to find a *really* good php editor. TextPad does fine, and I have been using it a lot, but it is a text editor, not a full fledged IDE. Dreamweaver is terrible, so thats out, and Im not going to pay $200 for Zend. Guess Im sticking to textpad
__________________
"Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws."
--Plato
sailor is offline  
Old 07-02-2004, 11:20 AM   #14 (permalink)
Junkie
 
I'm not giving up UltraEdit either. It's the best text editor I've ever used, and I've gotten familiar with most of the features. I'd never even consider a WYSIWYG editor like Dreamweaver or Front Page.
SinisterMotives is offline  
Old 07-02-2004, 11:59 AM   #15 (permalink)
SiN
strangelove
 
SiN's Avatar
 
Location: ...more here than there...
Quote:
Originally posted by SinisterMotives
I'm using UltraEdit32. It highlights a lot of languages, but PHP isn't one of them. I can get some highlighting if I set it to highlight PHP as Perl, but it's hit-and-miss. Is there an add-on PHP language file for UltraEdit?
You don't have PHP in the Syntax Highlighting - Color Selection - Language dropdown?

Which version you use? Perhaps you just need to upgrade..I'm using the latest and it's there.

<3 UltraEdit
__________________
- + - ° GiRLie GeeK ° - + - °
01110010011011110110111101110100001000000110110101100101
Therell be days/When Ill stray/I may appear to be/Constantly out of reach/I give in to sin/Because I like to practise what I preach
SiN is offline  
Old 07-02-2004, 12:04 PM   #16 (permalink)
Upright
 
When it comes to editing php I like Php Edit

It is free and works fairly well.
Well flock now that is an actual release they charge for it. Bastages!

Last edited by Thomas Heretic; 07-02-2004 at 12:19 PM..
Thomas Heretic is offline  
Old 07-02-2004, 12:53 PM   #17 (permalink)
Junkie
 
Quote:
Originally posted by SiN
You don't have PHP in the Syntax Highlighting - Color Selection - Language dropdown?

Which version you use? Perhaps you just need to upgrade..I'm using the latest and it's there.

<3 UltraEdit
I have a trial version of 10.20a that has the same View >> View As (Highlighting File Type) options as in previous versions. What version are you using?
SinisterMotives is offline  
Old 07-02-2004, 02:56 PM   #18 (permalink)
SiN
strangelove
 
SiN's Avatar
 
Location: ...more here than there...
Quote:
Originally posted by SinisterMotives
I have a trial version of 10.20a that has the same View >> View As (Highlighting File Type) options as in previous versions. What version are you using?
Heh...I was using 10.10c, just upgrading now.

Odd, when I look in the view menu I also have PHP option...and iirc it's been there through a few versions.

It shouldn't be related to the software being registered, but I don't know for sure, I've never used the trial.

Look here:


and if need be, go here:
http://ultraedit.com/downloads/additional.html
__________________
- + - ° GiRLie GeeK ° - + - °
01110010011011110110111101110100001000000110110101100101
Therell be days/When Ill stray/I may appear to be/Constantly out of reach/I give in to sin/Because I like to practise what I preach
SiN is offline  
Old 07-02-2004, 03:01 PM   #19 (permalink)
Junkie
 
Thanks, SiN! It's still not there, but at least now I know how to install the wordfile from Sourceforge that Sailor pointed me to.
SinisterMotives is offline  
 

Tags
nice, php or mysql, thisplease


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 05:29 PM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360