kbjradmin
New Member
- Messages
- 512
- Reaction score
- 2
- Points
- 0
i have a php script designed to build the code for an HTML format résumé. however, every time i run this script, the $resumeCode variable (where i'm storing the HTML) turns up empty. i tried dumping the value of the variable and it returned NULL. here is the script:
please help
PHP:
<?php
// sets category code block for resume
function resumeCategory($title){
$code = '<div class="category"><h1>'.$title.'</h1><hr /></div>';
return $code;
}
// sets education code block for resume
function resumeEdu($school,$loc,$degree,$date){
$code = '<div class="eduBlock"><p>'.$school.' '.$loc.'<br />'.$degree.'<br />'.$date.'</p></div>';
return $code;
}
// sets two column list for resume
function resumeList($items){
$minItems = 4; # any list containing this many or less items will be one column
if ( count($items) <= $minItems ){
$code = '<div class="itemlist">';
for ($i = 0; $i <= count($items); $i++){
$code = $code.'<p>'.$items[$i].'</p>'."\n";
}
$code = $code.'</div>';
}
else{
$numItemsHalf = count($items) / 2;
$code1 = '<div class="itemlist1">';
for ($i = 0; $i <= $numItemsHalf-1; $i++){
$code1 = $code1.'<p>'.$items[$i].'</p>'."\n";
$code1 = $code1.'</div>';
}
$code2 = '<div class="itemlist2">';
for ($i = $numItemsHalf; $i <= count($items); $i++){
$code2 = $code2.'<p>'.$items[$i].'</p>'."\n";
$code2 = $code2.'</div>';
}
$code = '<div class="compoundList">'.$code1."\n".$code2.'</div>';
}
return $code;
}
// sets experience block for resume
function resumeExp($title,$compName,$date,$desc){
$code = '<div class="exp"><h1>'.$title.'</h1><h2>'.$compName.'</h2><h3>'.$date.'</h3><p>'.$desc.'</p></div>';
return $code;
}
// sets reference block for resume
function resumeRef($name,$relation,$phone,$email){
$code = '<div class="ref"><h1>'.$name.'</h1><h2>'.$relation.'</h2><h3>'.$phone.'</h3><h4>'.$email.'</h4></div>';
return $code;
}
// sets resume code
$resumeCode = '<div id="resume">'.
//*
resumeCategory(
'Education'
).//*/
//*
resumeEdu(
'Clark College',
'Vancouver, Wa',
'Associates in Applied Technology',
'To Be Completed: June 2009'
).//*/
//*
resumeCategory(
'Major College Courses'
).//*/
//*
resumeList(
array(
'Intro To Programming',
'Intro To Unix',
'Calculus I'
)
).//*/
//*
resumeCategory(
'Skills'
).//*/
//*
resumeList(
array(
'Microsoft Office 2003/2007',
'XHTML 1.0, CSS',
'PHP',
'Python',
'Logical Problem Solving',
'Windows XP / Vista / DOS (also 95 and 98)',
'Debian Linux (can use VI)',
'Unix Shell Scripting',
'Higher Level Mathematics',
'Website Administration',
'Currently Studying Perl'
)
).//*/
//*
resumeCategory(
'Experience'
).//*/
//*
resumeExp(
'Webmaster',
'',
'',
'Designed and coded personal portfolio site using XHTML, CSS, and PHP. Site validated for XHTML Transitional 1.0 and CSS Level 2.1. I am also currently in the process of building a template selling site and a form/mailing script generating site. All sites are available through my main portal at http://kbjr.x10hosting.com.'
).//*/
//*
resumeExp(
'Shell Programmer',
'',
'',
'Wrote multiple useful Linux shell scripts. Scripts were written under Debian Linux using VI and written for use in the bash shell. Scripts written include a script for echoing text in color and locking the Linux terminal.'
).//*/
//*
resumeExp(
'Python Programmer',
'',
'',
'Wrote multiple simple scripts including an extension to the built-in math library, a statistics library, a basic module for converting between strings and lists, a card deck handling system, and a text-interface poker game.'
).//*/
//*
resumeCategory(
'References'
).//*/
//*
resumeRef(
'Gail Thurber',
'Web Design Instructor',
'(360) 604 - 6227',
''
).//*/
'</div>';
//*/
?>
please help
Last edited: