Click here to Skip to main content
14,689,511 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
For following code, I got an error as
Fatal error: Can't use function return value in write context in /home/taxguide/public_html/page_sub2.php on line 745

Do you help me about identifying the problem!

if( !empty(trim($relatedLinks[$i])) ) { /* FARHAN @ 13-01-14 */
$NALinkE    = $objDB->query_table("non_article","NANumberShort = ". trim($relatedLinks[$i]),"Title ASC");

$NALinkF    =   $objDB->fetch_array($NALinkE);

$link = generate_link('', $NALinkF["Attachment"], '');


<a href="<?php echo $link;?>" class="bottom_link11"><?php echo ($i<count($relatedLinks)-1) ? trim($relatedLinks[$i]).',' : trim($relatedLinks[$i]);?></a>

<?php } } } ?>

1 solution


Prior to PHP 5.5, empty() only supports variables; anything else will result in a parse error. In other words, the following will not work: empty(trim($name)). Instead, use trim($name) == false.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900