我想返回打印的結果,用于其他功能。這是代碼:"Keyword idea text '%s' has %d average monthly searches and competition as %d.%s",$result->getText()->getValue(),is_null($result->getKeywordIdeaMetrics()) ?0 : $result->getKeywordIdeaMetrics()->getAvgMonthlySearches()->getValue(),is_null($result->getKeywordIdeaMetrics()) ?0 : $result->getKeywordIdeaMetrics()->getCompetition(),PHP_EOL);return結果如下:關鍵字創意文本“a”的平均每月搜索和競爭為 4。關鍵字創意文本“b”的平均每月搜索和競爭為 2。關鍵字創意文本“c”的平均每月搜索和競爭為 10作為 4。這是打印的方式我想像“a、b、c”一樣返回如何將此結果存儲在一個字符串中并返回 ....這樣我就可以在其他函數中使用
如何返回用php打印的結果
慕的地8271018
2022-12-30 16:10:54