David Cameron ended some text messages to Rebekah Brooks with the letters LOL, she has told the Leveson Inquiry.
The former Sun and News of the World editor was asked about the frequency of text contacts between the two when she was head of News International.
She said the prime minister signed off most texts with the letters DC but occasionally used the acronym LOL.
But she said he stopped this when he learnt the text shorthand stood for "laugh out loud" not "lots of love".
The disclosure became an instant topic of discussion on micro-blogging site Twitter, with a number of Labour politicians signing off their tweets on the subject lol.
Mrs Brooks was questioned for more than five hours about her relationship with politicians including Mr Cameron and former prime ministers Tony Blair and Gordon Brown and decisions taken by her papers when she was editor.
Mrs Brooks also told the inquiry she had the express permission of ex-Prime Minister Gordon Brown and his wife Sarah to run a story in 2006 about their son Fraser being diagnosed with cystic fibrosis.
But the Browns have issued a statement saying that "at no stage" was their permission sought.
She also told the inquiry into press ethics that suggestions Mr Cameron texted her up to 12 times a day while opposition leader were "preposterous" as both he and her had "better things to do".
The two exchanged messages about once a week although contacts increased to about two a week in the run-up to the 2010 general election.
DC vs LOL
Most messages, she said, were to discuss "organisation" or future social occasions but in one instance, she commented on Mr Cameron's performance in the first leadership debate, telling the opposition leader it was "not very good".
Mrs Brooks was pressed by the lead counsel for the inquiry, Robert Jay QC, on how Mr Cameron signed off his texts, saying "everyone wanted to know".
Asked by Lord Leveson why he had posed the question, Mr Jay said if he did not "people would inquire why the question was not asked".
In response, Mrs Brooks said the prime minister would use DC "in the main".
But she added: "Occasionally he would sign them off LOL, lots of love. Actually, until I told him it meant laugh out loud and then he did not sign them like that any more. But, in the main, DC, I would have thought."
After the brief exchange, Lord Leveson urged Mr Jay to "move on" to other subjects.
Conservative commentator Iain Dale has said Mrs Brooks was not alone in getting texts of this kind, saying he had also received messages signed LOL, DC.
"He does it to lots of people," said the blogger and radio presenter.
But former Lib Dem MP Evan Harris claimed that he had texted the prime minister after the birth of his daughter Florence in August 2010.
In a tweet , Mr Harris, who is a spokesman for the Hacked Off campaign which is seeking justice for victims of phone hacking, wrote: "He replied. Without an "lol" or even an "x".
And former deputy prime minister Lord Prescott sent a Twitter message to Number 10 saying he would put in an Freedom of Information (FOI) request to see all texts between Mr Cameron and Mrs Brooks.
Lord Prescott signed off his tweet, "keep your head up. LOL!" - a reference to a message reportedly passed on to Mrs Brooks by No 10 after her resignation in 2011.
The BBC's political correspondent Ross Hawkins said Lord Leveson could ask for all Mrs Brooks' text messages - many of which are unavailable after her Blackberry was "frozen" after she left News International - to be given to the inquiry.