0

Hi guys im so desperate:

I am just assigning a variable one string:

$tradersCatalog = 
                    '<div style="float:left; width:700px;  margin:8px 10px 5px 3px;">
    <div class="boxcontent" style="height:130px;"> 
        <div style="clear:both;">
            <div style="float:left; padding:5px;"><img src="" alt="" style="width:241px; height:120px;"></div>
            <div style="float:left; padding:5px; width:430px;">
                <div style="color:orange;"><font color="#555555" size="2"></font></div><div style="float:right"><a href="firms_view.php?&amp;fid=1011#fkatalog"><img src="images/products_detail_button.png" border="0"></a></div><a href="firms_view.php?&amp;fid=1011#fkatalog">
                    <div style="color:#222222;"><font color="red" size="5"></font></div>
                    <div style="font-size:11px; color:#000000;padding-top:5px;">
                        <hr>

                        <hr>
                    </div>
                </a><div style="clear:both;"><a href="firms_view.php?&amp;fid=1011#fkatalog">

                    </a><div style="float:left; margin:0px 0px 20px 0px;"><a href="firms_view.php?&amp;fid=1011#fkatalog">
                        </a>&nbsp;&nbsp;<font color="green"><b></b></font></a>
                    </div>

                    <div style="float:right; margin:0px 0px 20px 0px;">
                    </div>
                </div>
            </div>
            <br><br>
        </div>
        <div style="clear:both;"></div>
    </div>
    <div style="clear:both;"></div>
</div>';

this results in that $tradersCatalog has value of NULL.

when I try a shorter string it's ok. What the hell???

2
  • Works fine for me -> codepad.org/N9oSP279 Commented Nov 27, 2011 at 10:06
  • 2
    @Alexander Beninski this code isn't sufficient to address the issue. As already posted, the code works, so there's OUGHT TO be something else you're not saying, like for ex. where and how you're using that variable. Please post the relevant code in which you're creating, using and displaying that var, and then we can talk. Now is just a wild guessing on a non-replicable problem! Commented Nov 28, 2011 at 7:09

1 Answer 1

1

To make things simply, why don't you add all of that html into a view and pass in the parameters (the href links I'm guessing). This may help in finding the problem.

$this->load->view('traders_catalog', array('href' => 'fid=1011#fkatalog'));

You can call a view from a controller of from another view.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.