PHP Questine
- Started
- Last post
- 12 Responses
- GeorgesII
what is wrong with this like,
I get an error, but I don't see my mistake?
http://www.neofuturism.net/work/…echo "document.write("$news_string...
- i_was0
maybe this: ; at end of statement.
you can't echo such statement: echo "document.write("$news_string...
you would need <script>document.write
and you need periods between the variable: document.write(".$news_string
anyway waht a big mess.
- GeorgesII0
yeah, I'm not really good at php,
all the sintaxes are gibberish for me
- GeorgesII0
is this good?
it kinda worked
echo "document.write('$news_string...
- ukit20
Just add moar question marks and brackets, eventually it'll work
- mekk0
thats not php, document.write is javascript.
can we see the code?
- GeorgesII0
I'm trying to use magpierss to output a text based rss, no image no nothing, just text,
it kinda works now but I may be missing a html formatting
http://www.neofuturism.net/work/…
http://pastebin.com/z1MrmHBA
- kingsteven0
you should use '.=' to append to $news_string & $news_string1, at the minute you're just re-setting the variable on every loop - so just getting the last item.
http://php.net/manual/en/languag…
btw. from experience when working with html it's much easier to debug when using single quotes for strings in php:
$somehtml = '<a class="external" href="'.$someurl.'" >'. $somesite .'</a>'
also, any particular reason for using document.write?
- vdc0
Change:
echo "document.write('$news_string...
echo "document.write('$news_string1...to:
echo $news_string;
echo $news_string1;Like so: http://pastebin.com/WfadPEvJ
- vdc0
Also, remove this line:
header("Content-type:text/javasc...
- GeorgesII0
Stupid noob question,
can I apply a css to it?- Now you're really asking for trouble.boobs
- like going to a butter fight with a spoonGeorgesII
- Just close the PHP tag, write your HTML with styles, and open it again when you need to output PHP again. e.g.: http://pastebin.com/…vdc
- http://pastebin.com/…vdc
- Oops. Styles should be inside the head: http://pastebin.com/…vdc
- GeorgesII0
A big thank to all of you,
and a special thank to vdc whom allowed me to make the first step in my smut project :)