5

I can render a DomPDF file with the following line :

$dompdf->stream($fileNo.$name.$description.".pdf");

It outputs a pdf that looks like : 121CharlesLakeHome.pdf

How would I put a dash in there to make it look like this : 121-Charles-LakeHome.pdf

I have tried this :

$dompdf->stream($fileNo."-"$name."-"$description.".pdf");

No Workie. Any Suggestions?

3
  • you got syntax error. You forgot dot(point) '.' in string $dompdf->stream($fileNo."-"$name."-"$description.".pdf"); should be the $dompdf->stream($fileNo."-".$name."-".$description.".pdf");
    – Naumov
    Mar 28, 2016 at 20:29
  • @Naumov That was exactly it, Thanks! How can I select this as an answer?
    – Steven
    Mar 28, 2016 at 20:42
  • I posting this comment as answer. You can edit my answer, because I bad speak English.
    – Naumov
    Mar 28, 2016 at 21:12

1 Answer 1

11

got syntax error. You forgot dot(point) '.' in string $dompdf->stream($fileNo."-"$name."-"$description.".pdf"); should be this $dompdf->stream($fileNo."-".$name."-".$description.".pdf");

2
  • Thanks, did not realize the "." had to be before and after the variables. Learning php slowly but surely :D
    – Steven
    Mar 28, 2016 at 21:11
  • @Steven Is fine in begin.
    – Naumov
    Mar 28, 2016 at 21:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.