italkonphone Posted June 7, 2006 Share Posted June 7, 2006 [img src=\"style_emoticons/[#EMO_DIR#]/huh.gif\" style=\"vertical-align:middle\" emoid=\":huh:\" border=\"0\" alt=\"huh.gif\" /] :huh: i use dreamweaver to edit php , it is a template, im trying to learn and enter more txt on different linesit just wont let me, the code is as follows if anyone can help most appriciated. thanks peeps.<?php/**/define('NAVBAR_TITLE', 'About us');define('HEADING_TITLE', 'About us');define('HISTORY_TITLE', 'OUR HISTORY');define('TEXT_INFORMATION', 'We have a simple philosophy, i talk on phone, you talk on phone everyone talk on phone. Thats what we want to see and to get there we make sure we do it so you enjoy the experiance. Its all about i talk on phone');the above is shown but i can enter anything else as belowdefine('TEXT_INFORMATION', 'www.italkonphone.co.uk is a online company, that is independant of all the major networks to you the best deal you deserve.');define('TEXT_INFORMATION', 'www.italkonphone.co.uk is a VIP service for many clients, what defines a VIP, you do with what you do, what you say and how you say it.'); Quote Link to comment https://forums.phpfreaks.com/topic/11437-entering-txt/ Share on other sites More sharing options...
ober Posted June 7, 2006 Share Posted June 7, 2006 You're reusing the same label in your new defines... try something other than "TEXT_INFORMATION". Quote Link to comment https://forums.phpfreaks.com/topic/11437-entering-txt/#findComment-42922 Share on other sites More sharing options...
xyph Posted June 7, 2006 Share Posted June 7, 2006 I would also like to add PHP is a lanuage worth learning outside of dreamweaver. IMO it's far to complex to want to use a WYSIWYG editor.Your best bet is to use something similar to:$text_information = 'We have a simple philosophy, i talk on phone, you talk on phone everyone talk on phone. Thats what we want to see and to get there we make sure we do it so you enjoy the experiance. Its all about i talk on phone';$text_information .= 'www.italkonphone.co.uk is a online company, that is independant of all the major networks to you the best deal you deserve.';$text_information .= 'www.italkonphone.co.uk is a VIP service for many clients, what defines a VIP, you do with what you do, what you say and how you say it.';Then simply echo $test_information; Quote Link to comment https://forums.phpfreaks.com/topic/11437-entering-txt/#findComment-42932 Share on other sites More sharing options...
italkonphone Posted June 7, 2006 Author Share Posted June 7, 2006 what is echo lol, ? and ill use notepad i suppose or something. Quote Link to comment https://forums.phpfreaks.com/topic/11437-entering-txt/#findComment-42935 Share on other sites More sharing options...
xyph Posted June 7, 2006 Share Posted June 7, 2006 There is an amazing number of resources available on the web for PHP beginners. If you really weant to get into dynamic content, it's worth learning to do properly :)Read up on the php [a href=\"http://www.php.net/echo\" target=\"_blank\"]echo()[/a] command through that link. Quote Link to comment https://forums.phpfreaks.com/topic/11437-entering-txt/#findComment-42944 Share on other sites More sharing options...
Buyocat Posted June 7, 2006 Share Posted June 7, 2006 What exactly are you trying to accomplish? Because if you're really trying to use a lot of text then you should use a database to store it, or something like that. If you don't know what echo is then you need to go find a tutorial most likely. At any rate why not just use straight HTML if you are dead set on writing out all that text into variables? seems like it would take less effort and be just as easy to maintain to write:<p> blah blah blah </p>as:$text = "blah blah blah"echo $text; Quote Link to comment https://forums.phpfreaks.com/topic/11437-entering-txt/#findComment-42948 Share on other sites More sharing options...
italkonphone Posted June 7, 2006 Author Share Posted June 7, 2006 i understand echo now but whats happend is its outside the box that i want it in, as above the only statement within the box is define txt_information. is there a way of writing a variable to make it stay within the box ? Quote Link to comment https://forums.phpfreaks.com/topic/11437-entering-txt/#findComment-42958 Share on other sites More sharing options...
Buyocat Posted June 7, 2006 Share Posted June 7, 2006 What box? Are you referring to CSS? Someone above gave you I think the best advice for this problem, just concatenate by using " .= " so instead of overwriting the variable like you were doing above with multiple definitions, you just stick each new string on the end of the old stuff.$string = "lots of text";$string .= " even more text";$string .= " you get the point"echo $string;// outputs// lots of text even more text you get the point Quote Link to comment https://forums.phpfreaks.com/topic/11437-entering-txt/#findComment-42969 Share on other sites More sharing options...
SharkBait Posted June 7, 2006 Share Posted June 7, 2006 I agree with the about about using a WYSISYG editor with PHP. It just shouldn't be done ;)Even with HTML I would not use dreamweaver for. I used dreamweaver in the past but found it not to my liking and just stuck with notepad (back in the day I used simpletext on my mac).Anyway I use Crimson editor for my PHP and it allows me to learn how the innerworkings... work.. I guess I just like to look at code. Its the insides of thing that fancinate me, not the 'icing on the cake' ;) Quote Link to comment https://forums.phpfreaks.com/topic/11437-entering-txt/#findComment-42986 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.