按键值在数组中进行多维搜索[PHP]

时间:2017-10-05 16:51:38

标签: php arrays multidimensional-array

我试图在数组中使用itag值找到url值。 我想在itag值为18(itag = 18)的数组中找到url值。

PHP代码:

private async void OnDataRequested(DataTransferManager sender, DataRequestedEventArgs args)
{
    var deferral = args.Request.GetDeferral();

    var si = await StorageFile.CreateStreamedFileAsync("Document.pdf", stream =>
    {
        var writeStream = stream.AsStreamForWrite();
        writeStream.Write(PdfBytes, 0, PdfBytes.Length);
        stream.Dispose();    

        args.Request.Data.Properties.Title = "PDF Document";
        args.Request.Data.Properties.Description = "Some description";
        args.Request.Data.SetStorageItems(new IStorageItem[] { si });
        deferral.Complete();

    },  null);
}

输出样本: https://gist.githubusercontent.com/ahmethakanbesel/30cb351501588f2e5c5d961aefb48aa0/raw/a29b2f016b39d452602b1f8aca5bbd6823886bb4/array.txt

1 个答案:

答案 0 :(得分:0)

一个简单的“if”语句可以:

library(dplyr)
##rough-syntax is as follows
grouped_data = orginal_data %>% group_by(SIC, Date)  

library(forecast)
pred <- lm(SALE ~ XOPR + PPEGT)
pred #should give you the output of coefficients