chaking Posted June 6, 2008 Share Posted June 6, 2008 So I have a page that takes the id of a building and then prints out all relevant information on that building (all sorts of things like an address, hours of operation, phone numbers, contacts etc...). I formatted the output so that if you copied it into your clipboard and then pasted it in notepad, it would come out exactly how we wanted it. Now, we want to take that page of information, and put all of it (as is) into an mssql database. Basically I want to know if it's possible (and how) to grab all of that output and put it into one variable that I could then insert into the mssql database? Any ideas? Link to comment https://forums.phpfreaks.com/topic/108926-solved-turning-a-page-of-text-into-a-variable/ Share on other sites More sharing options...
DarkWater Posted June 6, 2008 Share Posted June 6, 2008 And still echo it out? Like, do you want it just saved in a variable, or do you want it in a variable and still display? Link to comment https://forums.phpfreaks.com/topic/108926-solved-turning-a-page-of-text-into-a-variable/#findComment-558829 Share on other sites More sharing options...
chaking Posted June 6, 2008 Author Share Posted June 6, 2008 No I don't need to echo it out, just store it in a variable so that I can insert it into the mssql database. Can I convert it all into a function (text($bldg)) and then say something like $c = text($bldg); ? Link to comment https://forums.phpfreaks.com/topic/108926-solved-turning-a-page-of-text-into-a-variable/#findComment-558837 Share on other sites More sharing options...
chaking Posted June 6, 2008 Author Share Posted June 6, 2008 Yup - make it all a function and then: $c = text($bldg); works like a charm - thanks for all the help guys......... Link to comment https://forums.phpfreaks.com/topic/108926-solved-turning-a-page-of-text-into-a-variable/#findComment-558852 Share on other sites More sharing options...
DarkWater Posted June 6, 2008 Share Posted June 6, 2008 Your ridiculous sarcasm will not garner you extra help. Now, you have two options. Make it into a function, or use output buffering. Link to comment https://forums.phpfreaks.com/topic/108926-solved-turning-a-page-of-text-into-a-variable/#findComment-558854 Share on other sites More sharing options...
chaking Posted June 6, 2008 Author Share Posted June 6, 2008 lol wtf-ever... I marked the topic as solved for a reason, and it wasn't because I still needed your help... btw: saying "thanks for all the help guys...." is hardly worth 'scolding' me over... get over yourself... Link to comment https://forums.phpfreaks.com/topic/108926-solved-turning-a-page-of-text-into-a-variable/#findComment-558856 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.