Validating some code outputted by php

Hello all:

The site in question is: Test1 ChuprinaStudios

When validating I get this message 11 times for the eleven images being used:

Line 99, Column 89: Bad value fncbx for attribute rel on element a: Keyword fncbx is not registered.
…ass=“fancybox” rel=“fncbx” href=“img/original/pitcher.jpg” target=“_blank”></a>
Syntax of link type valid for <a> and <area>:
A whitespace-separated list of link types listed as allowed on <a> and <area> in the HTML specification or listed as an allowed on <a> and <area> on the Microformats wiki without duplicate keywords in the list. You can register link types on the Microformats wiki yourself.

I actually have no idea on this one. and am not sure what it really says…

The php code calling for those images is:

						/* Configuration Start */
						$thumb_directory = 'img/thumbs';
						$orig_directory = 'img/original';
						$deg2radians = pi() * 2 / 360;
						$rad = $rot * $deg2radians;
						$cosTheta = cos($rad);
						$sinTheta = sin($rad);
						$stage_width=500;	// How big is the area the images are scattered on
						/* Configuration end */
						/* Opening the thumbnail directory and looping through all the thumbs: */
						$dir_handle = @opendir($thumb_directory) or die("There is an error with your image directory!");
						while ($file = readdir($dir_handle)) 
								/* Skipping the system files: */
								if($file=='.' || $file == '..') continue;
								$file_parts = explode('.',$file);
								$ext = strtolower(array_pop($file_parts));
								/* Using the file name (withouth the extension) as a image title: */
								$title = implode('.',$file_parts);
								$title = htmlspecialchars($title);
								/* If the file extension is allowed: */	
										/* Generating random values for the position and rotation: */
										$top=rand(0, 250);
										$rot = rand(-40,40);
										if($top>$stage_height-130 && $left > $stage_width-230)
											/* Prevent the images from hiding the drop box */
        /* Outputting each image: */
        echo '
	        <div id="pic-'.($i++).'" class="pic" style="top:'.$top.'px;left:'.$left.'px;background:url('.$thumb_directory.'/'.$file.') no-repeat 50% 50%; -moz-transform:rotate('.$rot.'deg); -webkit-transform:rotate('.$rot.'deg);">
	        <a class="fancybox" rel="fncbx" href="'.$orig_directory.'/'.$file.'" target="_blank"></a>
						/* Closing the directory */

But the area I think the error is in is:

<a class="fancybox" rel="fncbx" href="'.$orig_directory.'/'.$file.'" target="_blank"></a>

I have no idea what is causing this validation error. Any help, assistance, or code is greatly appreciated.


Well, by the looks of that error, you may just need to remove the rel (rel=“fncbx”) attribute from the link.

This seems to be a question about an online html validator, maybe validating the new microdata?

PHP seems to be doing its job and outputting what you want, its just that what you want is illegal in terms of your validator. The spec of the schema you are checking against is probably the place to look first.