Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I'm trying to echo my base url with my CI application in my main js file as so:
var url = "<?php echo base_url('association/') ?>" + $(this).attr("id");
and what I end up with is this:
<?php echo base_url('association/') ?>120
What am I doing wrong?
*.js
main.js.php
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.
*.jsfiles through the php interpretormain.js.php... dirtier than a public toilet in Soho but it does work.