I’m struggling to find an answer on how to add text on the same line as a printed php variable in my Drupal site. It has to be incredibly easy, but i’m learning. When I type
Time:<?php print render($content['field_duration']); ?>minutes
I get:
Time:
5
minutes
Anyway to get it to be “Time: 5 minutes”?
I guess it’ll be easier to solve that with css or without render().
With CSS something like this:
And without render() – just to output
$content['your_field']on your own.var_dump()this variable to be sure what data it contains, and thenechothis data directly (viaforeachif it’s an array). I hope it should work just fine.