If you have been working with websites as long as we have, you have probably seen a few shares of odd requests. This is our take on sharing the web development world.
This question was raised to me recently and it peeked my interest to solve and find out how to do this. After digging around i found 2 working codes for my case.
To explain further my tables are generated dynamically so the column widths and gaps differ by each refresh of the table
There are the 2 options that i found
Hope this code helps out somebody out there. If you have any questions, just drop me a line.
There was a requirement before that the webpage needs to be converted to any language that the guest will be coming from.
So I got digging and found the code that will let Google translate convert it on the fly. Take note that this might need a few web source tinkering.
Here it is :
And the output you will see is :
I’m not sure why I cannot copy and paste code to WordPress for now. I am suspecting that you cannot copy <DIV> statements. But soon I will know why. But for now, a screenshot will do.
Now, of course, there is a downside to using this one. The translation going back from Chinese-to-English for example might not yield the same result. Just be careful if you are using words like Parent’s Portal that might be translated as an intergalactic dimension.
Just to be safe, we can keep it to plain or simple words that google can understand.
$input ='input.txt';
$output ='output.txt';if(false!==($ih = fopen($input,'r'))){
$oh = fopen($output,'w');while(false!==($data = fgetcsv($ih))){// this is where you build your new row
$outputData = array($data[0], $data[1], $data[4], $data[5], $data[6]);
fputcsv($oh, $outputData);}
fclose($ih);
fclose($oh);}