Topic Replies with keywords in mind

I was searching for a solution today and I couldn't find anything using the keywords I though matched what I needed to find. So once I found the solution or atleast something to help I made sure to include the statement I was searching for. Maybe next time someone else won't have to look as hard as I did.

Which leads me to another topic. If you post a question online and you find the answer please go back and let everyone know what that solution was.

Extracting Microsfoft Excel CSV in PHP

I deal with lots of data. Data that people want extracted from our product database into their custom format and also they want us to manipulate their data. What I've done here is take the MS Excel CSV file which only wraps text in quotes if it has a comma in it. Hope it helps to import MS Excel CSV into a standard PHP array.

<?php

$file = './test.csv';
updateFile( $file );

function updateFile( $fileName )
{
	$F = fopen( $fileName, 'r' );
	//	get header of file
	$header = fgets( $F, 1024 );
	$header = trimLine( $header );
	$header = csvExtract( $header );
	

Special Characters in XML

At work I've always had problems when people copy and paste from word into PeopleSoft because I've then used that data to populate XML files for other people to use. I've been automating everything in regards to generating these files so instead of manually editing the special characters for (R) and (TM) I've had to get inventive. Below is the code I've come up with this to remove the special character to the registration symbol into an XML UTF-8 symbol that will display correctly on the web. If I ever have to include more characters I'll keep updating this post.

  

Drupal: The start of an new adventure

BombDrop.net has had many faces over the years. Starting out on the eve of the Iraq War to count down when the first bombs would drop and now a placeholder for DNS subdomains. No more will this be just a placeholder for grander things.

Syndicate content